Gorilla.Audio.FMOD.Geometry
Unit Gorilla.Audio.FMOD.Geometry.pasClasses
- TGorillaFMODGeometry = class ( TGorillaFMODObject , IGorillaFMODGeometry )
TGorillaFMODGeometry
Wrapper record structure for geometry instances.
Ancestors
Implements Interfaces
- IGorillaFMODGeometry
Members
Methods
- public constructor Create
(
ASystem :
IGorillaFMODSystem; const
AMaxPolygons :
Integer; const
AMaxVertices :
Integer
)
;
Geometry creation function. This function will create a base geometry object which can then have polygons added to it.
- public constructor CreateFromData
(
ASystem :
IGorillaFMODSystem; const
AData :
Pointer; const
ADatasize :
Integer
)
;
Creates a geometry object from a block of memory which contains pre-saved geometry data, saved by Geometry::save.
- public destructor Destroy
(
)
;
Frees a geometry object and releases its memory.
- private function GetUserData ( ) : Pointer ;
- private procedure SetUserData ( const AValue : Pointer ) ;
- private function GetActive ( ) : LongBool ;
- private procedure SetActive ( const AValue : LongBool ) ;
- private function GetRotation ( ) : TGorillaFMODOrientation ;
- private procedure SetRotation ( const AValue : TGorillaFMODOrientation ) ;
- private function GetPosition ( ) : TPoint3D ;
- private procedure SetPosition ( const AValue : TPoint3D ) ;
- private function GetScale ( ) : TPoint3D ;
- private procedure SetScale ( const AValue : TPoint3D ) ;
- private function GetNumPolygons ( ) : Integer ;
- private function GetMaxPolygons ( ) : TGorillaFMODMaxPolygons ;
- private function GetPolygonAttributes ( AIndex : Integer ) : TGorillaFMODPolygonAttributes ;
- private procedure SetPolygonAttributes ( AIndex : Integer; const AValue : TGorillaFMODPolygonAttributes ) ;
- public procedure AddPolygon
(
const
APolygon :
TGorillaFMODPolygon
)
;
Adds a polygon to an existing geometry object.
- public function GetPolygonNumVertices
(
AIndex :
Integer
)
: Integer
;
Gets the number of vertices in a polygon which is part of the geometry object.
Parameters
- AIndex : Integer - Polygon index. This must be in the range of 0 to Geometry::getNumPolygons minus 1.
- public procedure SetPolygonVertex
(
AIndex :
Integer; AVertexIndex :
Integer; const
AVertex :
TPoint3D
)
;
Alters the position of a polygon's vertex inside a geometry object.
Parameters
- AIndex : Integer - Polygon index. This must be in the range of 0 to Geometry::getNumPolygons minus 1. Vertex index inside the polygon. This must be in the range of 0 to Geometry::getPolygonNumVertices minus 1. Address of an FMOD_VECTOR which holds the new vertex location.
- AVertexIndex : Integer - Polygon index. This must be in the range of 0 to Geometry::getNumPolygons minus 1. Vertex index inside the polygon. This must be in the range of 0 to Geometry::getPolygonNumVertices minus 1. Address of an FMOD_VECTOR which holds the new vertex location.
- const AVertex : TPoint3D - Polygon index. This must be in the range of 0 to Geometry::getNumPolygons minus 1. Vertex index inside the polygon. This must be in the range of 0 to Geometry::getPolygonNumVertices minus 1. Address of an FMOD_VECTOR which holds the new vertex location.
- public function GetPolygonVertex
(
AIndex :
Integer; AVertexIndex :
Integer
)
: TPoint3D
;
Retrieves the position of the vertex inside a geometry object.
Parameters
- AIndex : Integer - Polygon index. This must be in the range of 0 to Geometry::getNumPolygons minus 1. Vertex index inside the polygon. This must be in the range of 0 to Geometry::getPolygonNumVertices minus 1.
- AVertexIndex : Integer - Polygon index. This must be in the range of 0 to Geometry::getNumPolygons minus 1. Vertex index inside the polygon. This must be in the range of 0 to Geometry::getPolygonNumVertices minus 1.
- public procedure Save
(
AData :
Pointer; ADataSize :
PFMOD_Int
)
;
Saves the geometry object as a serialized binary block, to a user memory buffer. This can then be saved to a file if required and loaded later with System::loadGeometry.
Parameters
- AData : Pointer - Address of a variable to receive the serialized geometry object. Specify 0 or NULL to have the datasize parameter return the size of the memory required for this saved object. Address of a variable to receive the size in bytes required to save this object when 'data' parameter is 0 or NULL.
- ADataSize : PFMOD_Int - Address of a variable to receive the serialized geometry object. Specify 0 or NULL to have the datasize parameter return the size of the memory required for this saved object. Address of a variable to receive the size in bytes required to save this object when 'data' parameter is 0 or NULL.
Properties
- public UserData : Pointer
A user value that the Geometry object will store internally. Can be retrieved with Geometry::getUserData.
read GetUserData
write SetUserData - public Active : LongBool
- public Rotation : TGorillaFMODOrientation
- public Position : TPoint3D
Sets the position of the object in world space, which is the same space FMOD sounds and listeners reside in.
read GetPosition
write SetPosition - public Scale : TPoint3D
- public NumPolygons : Integer
- public MaxPolygons : TGorillaFMODMaxPolygons
Retrieves the maximum number of polygons and vertices allocatable for this object. This is not the number of polygons or vertices currently present. The maximum number was set with System::createGeometry.
read GetMaxPolygons - public PolygonAttributes[Index] : TGorillaFMODPolygonAttributes
Individual attributes for each polygon inside a geometry object.
read GetPolygonAttributes
write SetPolygonAttributes