Gorilla.FBX.Model
Unit Gorilla.FBX.Model.pasClasses
- TFBXMesh = class ( TCustomMeshDef )
- TFBXJointRefDef = class ( TJointRefDef )
- TFBXModel = class ( TModelDef )
Records
- record TAddPolygonStruct
TAddPolygonStruct
Fields
- public OrigIdxArr :
TIntegerDynArray
- public NormIdxArr :
TIntegerDynArray
- public BinormIdxArr :
TIntegerDynArray
- public TangentIdxArr :
TIntegerDynArray
- public UVIdxArr :
TIntegerDynArray
- public UVMapType :
TFBXMappingInformationType
- public BinormMapType :
TFBXMappingInformationType
- public TangentMapType :
TFBXMappingInformationType
- public NormMapType :
TFBXMappingInformationType
- public UVRefType :
TFBXReferenceInformationType
- public BinormRefType :
TFBXReferenceInformationType
- public TangentRefType :
TFBXReferenceInformationType
- public NormRefType :
TFBXReferenceInformationType
- public MaterialMap :
TIntegerDynArray
- public MaterialsCount :
Integer
- public BinormalsAvailable :
Boolean
- public TangentsAvailable :
Boolean
TFBXMesh
internal mesh definition type by this type we can store vertex information, materials and shaders
Ancestors
Members
Fields
Methods
- public constructor Create ( AOwner : TCustomDef ) ;
- public destructor Destroy ( ) ;
- protected procedure SetIsStatic ( AValue : Boolean ) ; override;
- protected function GetMeshes ( ) : TTransformDefList ;
- protected function ContainsVertexGroups ( ) : Boolean ;
- public procedure AddMesh ( const AMesh : TMeshDef ) ; override;
- public procedure RemoveMesh ( const AMesh : TMeshDef ) ; virtual;
- public function FindMeshById ( const AName : string; const AThrowException : Boolean ) : TMeshDef ; virtual;
- public procedure ApplyToMeshData ( const AData : TMeshData ) ; virtual;
- public procedure ApplyFromMeshData ( const AData : TMeshData ) ; virtual;
- public procedure ApplyToMeshDef ( const ADef : TMeshDef; AOptions : TCopyVertexOptions = [] ) ; virtual;
- public procedure CalcTextureCoordinates ( ) ; overload virtual;
- public procedure CalcTextureCoordinates ( AStartIdx : Integer; AStopIdx : Integer ) ; overload virtual;
- public procedure CalcTextureCoordinates ( AVertexBuffer : TVertexBuffer; ABoundingBox : TBoundingBox; AStartIdx : Integer; AStopIdx : Integer ) ; overload virtual;
- public procedure CalcFaceNormals ( const PropagateFaceNormalsToVertices : Boolean = True ; ASubMeshes : Boolean = True ) ; virtual;
- public procedure CalcSmoothNormals ( const Method : TMeshDefCalculateNormalMethod; const WeldEpsilon : Single = 0.001 ; ASubMeshes : Boolean = True ) ; virtual;
- public procedure CalcTangentBinormals ( ASubMeshes : Boolean = False ) ; overload virtual;
- public procedure CalcTangentBinormals ( const AData : TMeshData ) ; overload virtual;
- public function GetSize ( ) : Int64 ; override;
- public function ToJSON ( ) : TJSONObject ; override;
- public procedure FromJSON ( const AModel : TModelDef; const AValue : TJSONObject ) ; override;
- public function GetCombinedBoundingBox
(
)
: TBoundingBox
;
virtual;
Computes a local bounding box from all vertices inside of the specific mesh and all sub-meshes.
- public procedure AcquireBVH
(
)
;
virtual;
Create bounding volume hierarchy from current mesh vertices. If the BVH was already created, the method exits. Use UpdateBVH to destroy the an existing BVH and create a new one.
- public procedure UpdateBVH
(
)
;
virtual;
Destroys an eventually created BVH and creates a new one.
- public procedure ReleaseBVH
(
)
;
virtual;
Destroy a previously created bounding volume hierarchy.
- public function RayCastIntersect
(
const
ARayPos :
TPoint3D; const
ARayDir :
TPoint3D; const
ATransform :
TMatrix3D; var
AIntersection :
TPoint3D; var
ANormal :
TPoint3D
)
: Boolean
;
virtual;
Perform a ray cast on the specific mesh. The method return if ray cast was successful. In that case AIntersection and ANormal return values are set.
- public function GetNormalVectorFromPoints ( const A : TPoint3D; const B : TPoint3D; const C : TPoint3D ) : TPoint3D ;
- public procedure AddPolygon ( const APoly : TPolygon ) ; overload virtual;
- public procedure AddPolygon
(
const
APoly :
T3DPolygon
)
;
overload virtual;
Add a 3D polygon to the current mesh.
- public procedure AddPolygon
(
const
APoly :
TPolygon; const
ATexCoords :
TPolygon; const
ANormals :
T3DPolygon
)
;
overload virtual;
Add a 2D polyon to the current mesh.
- public procedure AddPolygon
(
const
APoly :
T3DPolygon; const
ATexCoords :
TPolygon; const
ANormals :
T3DPolygon
)
;
overload virtual;
Add a 3D polygon to the current mesh.
- public procedure ApplyTransformationMatrixToVertices
(
ATransform :
TMatrix3D; const
AModfiyVertices :
Boolean
)
;
virtual;
A user helper function to apply the transformation matrix of meshes to vertices. If second parameter AModfiyVertices is set to TRUE, transformation matrices will be applied directly to all vertices, instead of applying the transformation during rendering. matrix.
- public procedure MoveVerticesToPivot
(
)
;
virtual;
The method modifies all vertices to move them relatively to the center of the model. The methods takes usage of ApplyTransformationMatrixToVertices() and replaces dynamic transformation matrices.
Properties
- public Model : TModelDefread GetModel
- public Meshes : TObjectList<Gorilla.DefTypes.TTransformDef>
- public BVH : PBVHGeometry
If a bounding volume hierarchy was acquired by calling AcquireBVH(), you will get the structure by this property. Otherwise it will return NIL.
read FBVH - public RenderByVertexGroups : Boolean
TFBXJointRefDef
Ancestors
Members
TFBXModel
Ancestors
Members
Fields
- protected FCache :
TFBXCache
- protected FUpAxis :
TFBXAxis
- protected FUpAxisSign :
ShortInt
- protected FFrontAxis :
TFBXAxis
- protected FFrontAxisSign :
ShortInt
- protected FCoordAxis :
TFBXAxis
- protected FCoordAxisSign :
ShortInt
- protected FOriginalUpAxis :
TFBXAxis
- protected FOriginalUpAxisSign :
ShortInt
- protected FUnitScaleFactor :
Double
- protected FOriginalUnitScaleFactor :
Double
- protected FDiffuseColor :
TAlphaColorF
- protected FAmbientColor :
TAlphaColorF
- protected FDefaultCamera :
string
- protected FTimeMode :
Integer
- protected FTimeProtocol :
Integer
- protected FSnapOnFrameMode :
Integer
- protected FTimeSpanStart :
Int64
- protected FTimeSpanStop :
Int64
- protected FCustomFrameRate :
Double
- protected FTimeMarker :
string
- protected FCurrentTimeMarker :
Integer
- protected FDefinitions :
TObjectList<Gorilla.FBX.Types.TFBXDefinition>
Methods
- public constructor Create ( const AOwner : TMeshDef; const APackage : TObject ) ;
- public destructor Destroy ( ) ;
- protected procedure LoadNodesFromStream ( const AStream : TStream; const ACache : TFBXCache; const APostLoad : Boolean; out ACnxNode : TFBXNode; out AObjNode : TFBXNode ) ;
- protected procedure LoadConnectionsFromNode ( const ANode : TFBXNode; const ACache : TFBXCache; const AOverwriteExistingConnections : Boolean ) ;
- protected procedure DoAddPolygons ( ACache : TFBXCache; AMesh : TMeshDef; const AParams : TAddPolygonStruct; const AVertexOrder : TVertexOrder; out AVertexGroups : TArray<System.TArray<Gorilla.DefTypes.TTriangleIndex>> ) ;
- protected procedure LoadGeometryFromNode ( const ANode : TFBXNode; const ACache : TFBXCache; const AMesh : TMeshDef; const AVertexOrder : TVertexOrder; const ARevertedVector : TPoint3D ) ;
- protected procedure LoadTextureFromNode ( const AMatDef : TMaterialDef; const ANode : TFBXNode; const APropName : string; const ACache : TFBXCache ) ;
- protected procedure LoadLayeredTextureFromNode ( const AMatDef : TMaterialDef; const ANode : TFBXNode; const APropName : string; const ACache : TFBXCache ) ;
- protected procedure LoadMaterialFromNode ( const ANode : TFBXNode; const ACache : TFBXCache ) ;
- protected procedure LoadMaterialsFromNode ( const ANode : TFBXNode; const ACache : TFBXCache ) ;
- protected function GetNodeComplexTransformationMatrix ( const ANode : TFBXNode; out ATransform : TMatrix3D; out ARevertedVector : TPoint3D ) : Boolean ;
- protected function GetNode3DPoint ( const ANode : TFBXNode; out AVector : TPoint3D ) : Boolean ;
- protected function GetDeformerGeometryNode ( ACache : TFBXCache; ADeformer : TFBXNode ) : TFBXNode ;
- protected function GetGeometryMeshNode ( ACache : TFBXCache; AGeometry : TFBXNode ) : TFBXNode ;
- protected function GetMeshSkeletonNode ( ACache : TFBXCache; AMesh : TFBXNode ) : TFBXNode ;
- protected function GetDeformerSkeletonNode ( ACache : TFBXCache; ADeformer : TFBXNode ) : TFBXNode ;
- protected function GetSubDeformerSkeletonNode ( ACache : TFBXCache; ASubDeformer : TFBXNode ) : TFBXNode ;
- protected function GetParentLimbNode ( ACache : TFBXCache; ALimbNode : TFBXNode ) : TFBXNode ;
- protected function GetSkeletonNodeDeformer ( ACache : TFBXCache; ANode : TFBXNode ) : TFBXNode ;
- protected procedure SetJointDeformerNodes ( const AJoint : PFBXJoint; const ACache : TFBXCache; ASkeleton : PFBXSkeleton ) ;
- protected function GetSubDeformers ( ACache : TFBXCache; ADeformer : TFBXNode; AConnections : TFBXConnectionList ) : TList<Gorilla.FBX.Types.TFBXNode> ;
- protected function GetDefinitionById ( AId : string ) : TFBXDefinition ;
- protected function GetDefinitionByType ( AType : string ) : TFBXDefinition ;
- protected function LoadRawSkeletonHierarchyByLimbNode ( const ALimbNode : TFBXNode; const ACache : TFBXCache; ASkeleton : PFBXSkeleton; AParent : PFBXJoint ) : PFBXJoint ;
- protected function LoadRawSkeletonHierarchyByDeformer ( const ADeformerNode : TFBXNode; const ACache : TFBXCache; ASkeleton : PFBXSkeleton ) : PFBXJoint ;
- protected procedure BuildArmature ( const ASkeleton : PFBXSkeleton ) ;
- protected procedure LoadModelFromNode ( const ANode : TFBXNode; const ACache : TFBXCache ) ;
- protected procedure LoadDeformerFromNode ( const ANode : TFBXNode; const ACache : TFBXCache ) ;
- protected procedure LoadAnimation3DPointInterpolatorFromNode ( const ANode : TFBXNode; const ACache : TFBXCache; const AStage : TAnimationStageDef; const ACnxList : TFBXConnectionList ) ;
- protected procedure LoadAnimationQuaternionInterpolatorFromNode ( const ANode : TFBXNode; const ACache : TFBXCache; const AStage : TAnimationStageDef; const ACnxList : TFBXConnectionList ) ;
- protected procedure LoadAnimationCurveNodeFromNode ( const ANode : TFBXNode; const ACache : TFBXCache; const AAnim : TAnimationDef ) ;
- protected procedure LoadAnimationLayerFromNode ( const ANode : TFBXNode; const ACache : TFBXCache; const AAnim : TAnimationDef ) ;
- protected function LoadAnimationStackFromNode ( const ANode : TFBXNode; const ACache : TFBXCache ) : TAnimationDef ;
- protected procedure LoadModelObjectsFromNode ( const ANode : TFBXNode; const ACache : TFBXCache ) ;
- protected procedure LoadDeformerObjectsFromNode ( const ANode : TFBXNode; const ACache : TFBXCache ) ;
- protected procedure LoadSkeletonObjectsFromNode ( const ANode : TFBXNode; const ACache : TFBXCache ) ;
- protected procedure LoadAllObjectsFromNode ( const ANode : TFBXNode; const ACache : TFBXCache ) ;
- protected function LoadSingleAnimationFromNode
(
const
ANode :
TFBXNode; const
ACache :
TFBXCache
)
: TAnimationDef
;
The FBX SDK uses these data structures for animation: animation stacks (FbxAnimStack), animation layers (FbxAnimLayer), animation curve nodes (FbxAnimCurveNode), animation curves (FbxAnimCurve), and animation curve keys (FbxAnimCurveKey). The data structures are connected to each other through object-to-object (OO) connections and object-to-property (OP) connections in a FBX scene (FbxScene). See Animation Classes and their Interrelationships for more information about these data structures.
- protected procedure LoadDefinitionFromNode
(
const
ANode :
TFBXNode; const
ACache :
TFBXCache
)
;
The FBX SDK uses these data structures for animation: animation stacks (FbxAnimStack), animation layers (FbxAnimLayer), animation curve nodes (FbxAnimCurveNode), animation curves (FbxAnimCurve), and animation curve keys (FbxAnimCurveKey). The data structures are connected to each other through object-to-object (OO) connections and object-to-property (OP) connections in a FBX scene (FbxScene). See Animation Classes and their Interrelationships for more information about these data structures.
- protected procedure LoadDefinitionsFromNode ( const ANode : TFBXNode; const ACache : TFBXCache ) ;
- protected function GetMappingInformationType ( ANode : TFBXNode ) : TFBXMappingInformationType ;
- protected function GetReferenceInformationType ( ANode : TFBXNode ) : TFBXReferenceInformationType ;
- protected procedure ReadGlobalSettings ( ) ;
- protected function FindChildById ( const AId : string; const AThrowException : Boolean ) : TTransformDef ; override;
- public procedure LoadFromStream ( const AStream : TStream; const ACache : TFBXCache ) ; virtual;
- public function AddAnimationFromStream ( const AStream : TStream; const AFileName : string; ACache : TFBXCache ) : TAnimationDef ; virtual;
- public function FindFirstNode ( const AName : string ) : TFBXNode ;
- public function FindLastNode ( const AName : string ) : TFBXNode ;