Gorilla.STL.Exporter
Unit Gorilla.STL.Exporter.pasClasses
- TGorillaSTLExporter = class ( TGorillaExporter )
Constants
- const NL : string = "";
TGorillaSTLExporter
Ancestors
Members
Fields
- protected FFilename :
string
- protected FBinary :
Boolean
- protected FAllowMultipleMeshes :
Boolean
- protected FUseMultipleFiles :
Boolean
- protected FMeshCount :
Integer
- protected FFormat :
TFormatSettings
- protected FTempStream :
TBytesStream
- protected FOnMeshExported :
TOnGorillaSTLMeshExported
- protected FOnMeshFileExport :
TOnGorillaSTLMeshFileExport
Methods
- public constructor Create ( ) ;
- public destructor Destroy ( ) ;
- protected procedure ResetTempStream ( ) ;
- protected function DoWriteMeshToBinary ( const AWriter : TStreamWriter; const AMesh : TMeshDef ) : Boolean ;
- protected procedure DoWriteByteFormat ( const AModel : TMeshDef ) ;
- protected function DoWriteMeshToText ( const AWriter : TStreamWriter; const AMesh : TMeshDef ) : Boolean ;
- protected procedure DoWriteTextFormat ( const AModel : TMeshDef ) ;
- protected procedure DoWriteSubMeshToFile ( const AMesh : TMeshDef ) ;
- protected function GetFlatMeshList
(
const
AModel :
TMeshDef
)
: TList<Gorilla.DefTypes.TMeshDef>
;
Sets up a flat list of all contained meshes ignoring model hierarchy.
- public procedure SaveToFile
(
const
AModel :
TModelDef; const
AFileName :
string
)
;
override;
Export to file.
- public procedure SaveToStream
(
const
AModel :
TModelDef; const
AStream :
TStream
)
;
override;
Export to stream.
Properties
- public Binary : Boolean
- public FileName : string
- public AllowMultipleMeshes : Boolean
By default STL only allows single meshes. But in case a model contains more than one mesh, you can allow to write also those to file. TAKE CARE: Because STL reader needs to be able to load multiple meshes!
read FAllowMultipleMeshes
write FAllowMultipleMeshes - public UseMultipleFiles : Boolean
If AllowMultipleMeshes is activated, you can dispatch multiple meshes to different files. This is very useful to keep compatible with STL restrictions (only one mesh per file allowed), but still export all contained meshes.
read FUseMultipleFiles
write FUseMultipleFiles