Support Forum G3D Web Page |
Common base class for models. More...
Inherits G3D::ReferenceCountedObject.
Inherited by G3D::ArticulatedModel, G3D::FontModel, G3D::HeightfieldModel, G3D::MD2Model, G3D::MD3Model, G3D::ParticleSystemModel, G3D::PointModel, and G3D::VoxelModel.
Classes | |
class | HitInfo |
class | Pose |
Information for converting a single frame of a Model to a Surface. More... | |
Public Member Functions | |
virtual const String & | className () const =0 |
Name of the G3D::Model subclass. More... | |
virtual bool | intersect (const Ray &ray, const CoordinateFrame &cframe, float &maxDistance, Model::HitInfo &info=Model::HitInfo::ignore, const Entity *entity=nullptr, const Model::Pose *pose=nullptr) const |
Determines if the ray intersects the heightfield and fills the info with the proper information. More... | |
virtual const String & | name () const =0 |
Name of the instance (usually based on the filename it is loaded from) More... | |
virtual void | pose (Array< shared_ptr< Surface > > &surfaceArray, const CFrame &rootFrame, const CFrame &prevFrame, const shared_ptr< Entity > &entity, const Model::Pose *pose, const Model::Pose *prevPose, const Surface::ExpressiveLightScatteringProperties &e)=0 |
This will be replaced soon with a version that takes a shared_ptr<Pose>. More... | |
Static Public Member Functions | |
static void | setUseOptimizedIntersect (bool b) |
If true, complex models should use TriTree to accelerate intersect() calls where possible. More... | |
static bool | useOptimizedIntersect () |
Static Protected Member Functions | |
template<class T , class ... ArgTypes> | |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
Like std::make_shared, but works for protected constructors. More... | |
Common base class for models.
|
pure virtual |
Name of the G3D::Model subclass.
Implemented in G3D::ArticulatedModel, G3D::ParticleSystemModel, G3D::PointModel, G3D::VoxelModel, G3D::FontModel, G3D::MD2Model, G3D::MD3Model, and G3D::HeightfieldModel.
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
|
inlinevirtual |
Determines if the ray intersects the heightfield and fills the info with the proper information.
maxDistance | Max distance to trace to on input, hit distance written on output if hit |
Reimplemented in G3D::ArticulatedModel, G3D::MD2Model, G3D::MD3Model, G3D::HeightfieldModel, G3D::PointModel, G3D::VoxelModel, and G3D::FontModel.
|
pure virtual |
Name of the instance (usually based on the filename it is loaded from)
Implemented in G3D::ArticulatedModel, G3D::MD2Model, G3D::MD3Model, G3D::ParticleSystemModel, G3D::HeightfieldModel, G3D::PointModel, G3D::VoxelModel, and G3D::FontModel.
|
pure virtual |
This will be replaced soon with a version that takes a shared_ptr<Pose>.
pose | Must have the subclass of Model::Pose appropriate to the Model subclass. |
Implemented in G3D::ArticulatedModel, G3D::ParticleSystemModel, G3D::PointModel, G3D::VoxelModel, G3D::FontModel, G3D::MD2Model, G3D::MD3Model, and G3D::HeightfieldModel.
|
inlinestatic |
If true, complex models should use TriTree to accelerate intersect() calls where possible.
This can make the first intersect() call very slow for the tree build and can make loading slow. It may not affect performance of skinned or articulated models that animate.
This value should be set before the models are loaded. If it is changed after a model is loaded, the Model is not required to respond to it.
Default: false
|
inlinestatic |