This documents an old version of bs::framework. Click here to see the latest release.
MeshImportOptions Class Reference

Description

Contains import options you may use to control how is a mesh imported from some external format into engine format.

Inherits ImportOptions.

Methods

void setCPUCached (bool cached)
 Sets whether the texture data is also stored in CPU memory. More...
 
bool getCPUCached () const
 Retrieves whether the texture data is also stored in CPU memory. More...
 
void setImportNormals (bool import)
 Sets a value that controls should mesh normals be imported if available. More...
 
bool getImportNormals () const
 Retrieves a value that controls should mesh normals be imported if available. More...
 
void setImportTangents (bool import)
 Sets a value that controls should mesh tangents/bitangents be imported if available. More...
 
bool getImportTangents () const
 Retrieves a value that controls should mesh tangent/bitangent be imported if available. More...
 
void setImportBlendShapes (bool import)
 Sets a value that controls should mesh blend shapes be imported if available. More...
 
bool getImportBlendShapes () const
 Retrieves a value that controls should mesh blend shapes be imported if available. More...
 
void setImportSkin (bool import)
 Sets a value that controls should mesh skin data like bone weights, indices and bind poses be imported if available.
 
bool getImportSkin () const
 Retrieves a value that controls should mesh skin data like bone weights, indices and bind poses be imported if available.
 
void setImportAnimation (bool import)
 Sets a value that controls should animation clips be imported if available. More...
 
bool getImportAnimation () const
 Retrieves a value that controls should animation clips be imported if available. More...
 
void setImportScale (float import)
 Sets a value that will uniformly scale the imported mesh by the specified value. More...
 
float getImportScale () const
 Retrieves a value that will uniformly scale the imported mesh by the specified value. More...
 
void setCollisionMeshType (CollisionMeshType type)
 Sets a value that controls what type (if any) of collision mesh should be imported. More...
 
CollisionMeshType getCollisionMeshType () const
 Retrieves a value that controls what type (if any) of collision mesh should be imported. More...
 
void setAnimationClipSplits (const Vector< AnimationSplitInfo > &splitInfos)
 Registers animation split infos that determine how will the source animation clip be split. More...
 
Vector< AnimationSplitInfogetAnimationClipSplits () const
 Returns a copy of the animation splits array. More...
 
void setAnimationEvents (const Vector< ImportedAnimationEvents > &events)
 Assigns a set of events that will be added to the animation clip, if animation import is enabled. More...
 
Vector< ImportedAnimationEventsgetAnimationEvents () const
 Returns a copy of the animation events array. More...
 
void setKeyFrameReduction (bool enabled)
 Enables or disables keyframe reduction. More...
 
bool getKeyFrameReduction () const
 Checks is keyframe reduction enabled. More...
 
void setImportRootMotion (bool enabled)
 Enables or disables import of root motion curves. More...
 
bool getImportRootMotion () const
 Checks is root motion import enabled. More...
 
RTTITypeBasegetRTTI () const override
 Returns an interface you can use to access class' Run Time Type Information. More...
 
- Methods inherited from IReflectable
bool isDerivedFrom (RTTITypeBase *base)
 Returns true if current RTTI class is derived from base (Or if it is the same type as base). More...
 
UINT32 getTypeId () const
 Returns an unique type identifier of the class. More...
 
const StringgetTypeName () const
 Returns the type name of the class. More...
 

Static methods

static SPtr< MeshImportOptionscreate ()
 Creates a new import options object that allows you to customize how are meshes imported. More...
 
static RTTITypeBasegetRTTIStatic ()
 
- Static methods inherited from ImportOptions
static RTTITypeBasegetRTTIStatic ()
 
- Static methods inherited from IReflectable
static UnorderedMap< UINT32, RTTITypeBase * > & getAllRTTITypes ()
 Returns all available RTTI types. More...
 
static SPtr< IReflectablecreateInstanceFromTypeId (UINT32 rttiTypeId)
 Creates an empty instance of a class from a type identifier. More...
 
static void _registerRTTIType (RTTITypeBase *rttiType)
 Called by each type implementing RTTITypeBase, on program load. More...
 
static RTTITypeBase_getRTTIfromTypeId (UINT32 rttiTypeId)
 Returns class' RTTI type from type id. More...
 
static bool _isTypeIdDuplicate (UINT32 typeId)
 Checks if the provided type id is unique. More...
 
static void _checkForCircularReferences ()
 Iterates over all RTTI types and reports any circular references (for example one type having a field referencing another type, and that type having a field referencing the first type). More...
 
static RTTITypeBasegetRTTIStatic ()
 Returns an interface you can use to access class' Run Time Type Information. More...
 

Method documentation

◆ create()

static SPtr<MeshImportOptions> create ( )
static

Creates a new import options object that allows you to customize how are meshes imported.

◆ getAnimationClipSplits()

Vector<AnimationSplitInfo> getAnimationClipSplits ( ) const

Returns a copy of the animation splits array.

See also
setAnimationClipSplits.

◆ getAnimationEvents()

Vector<ImportedAnimationEvents> getAnimationEvents ( ) const

Returns a copy of the animation events array.

See also
setAnimationEvents.

◆ getCollisionMeshType()

CollisionMeshType getCollisionMeshType ( ) const

Retrieves a value that controls what type (if any) of collision mesh should be imported.

◆ getCPUCached()

bool getCPUCached ( ) const

Retrieves whether the texture data is also stored in CPU memory.

◆ getImportAnimation()

bool getImportAnimation ( ) const

Retrieves a value that controls should animation clips be imported if available.

◆ getImportBlendShapes()

bool getImportBlendShapes ( ) const

Retrieves a value that controls should mesh blend shapes be imported if available.

◆ getImportNormals()

bool getImportNormals ( ) const

Retrieves a value that controls should mesh normals be imported if available.

◆ getImportRootMotion()

bool getImportRootMotion ( ) const

Checks is root motion import enabled.

See also
setImportRootMotion

◆ getImportScale()

float getImportScale ( ) const

Retrieves a value that will uniformly scale the imported mesh by the specified value.

◆ getImportTangents()

bool getImportTangents ( ) const

Retrieves a value that controls should mesh tangent/bitangent be imported if available.

◆ getKeyFrameReduction()

bool getKeyFrameReduction ( ) const

Checks is keyframe reduction enabled.

See also
setKeyFrameReduction

◆ getRTTI()

RTTITypeBase* getRTTI ( ) const
overridevirtual

Returns an interface you can use to access class' Run Time Type Information.

Note

You must derive your own version of RTTITypeBase, in which you may encapsulate all reflection specific operations.

Reimplemented from ImportOptions.

◆ setAnimationClipSplits()

void setAnimationClipSplits ( const Vector< AnimationSplitInfo > &  splitInfos)

Registers animation split infos that determine how will the source animation clip be split.

If no splits are present the data will be imported as one clip, but if splits are present the data will be split according to the split infos. Split infos only affect the primary animation clip, other clips will not be split.

◆ setAnimationEvents()

void setAnimationEvents ( const Vector< ImportedAnimationEvents > &  events)

Assigns a set of events that will be added to the animation clip, if animation import is enabled.

◆ setCollisionMeshType()

void setCollisionMeshType ( CollisionMeshType  type)

Sets a value that controls what type (if any) of collision mesh should be imported.

◆ setCPUCached()

void setCPUCached ( bool  cached)

Sets whether the texture data is also stored in CPU memory.

◆ setImportAnimation()

void setImportAnimation ( bool  import)

Sets a value that controls should animation clips be imported if available.

◆ setImportBlendShapes()

void setImportBlendShapes ( bool  import)

Sets a value that controls should mesh blend shapes be imported if available.

◆ setImportNormals()

void setImportNormals ( bool  import)

Sets a value that controls should mesh normals be imported if available.

◆ setImportRootMotion()

void setImportRootMotion ( bool  enabled)

Enables or disables import of root motion curves.

When enabled, any animation curves in imported animations affecting the root bone will be available through a set of separate curves in AnimationClip, and they won't be evaluated through normal animation process. Instead it is expected that the user evaluates the curves manually and applies them as required.

◆ setImportScale()

void setImportScale ( float  import)

Sets a value that will uniformly scale the imported mesh by the specified value.

◆ setImportTangents()

void setImportTangents ( bool  import)

Sets a value that controls should mesh tangents/bitangents be imported if available.

◆ setKeyFrameReduction()

void setKeyFrameReduction ( bool  enabled)

Enables or disables keyframe reduction.

Keyframe reduction will reduce the number of key-frames in an animation clip by removing identical keyframes, and therefore reducing the size of the clip.