Support Forum G3D Web Page |
Inherits G3D::Model.
Classes | |
class | Specification |
Public Member Functions | |
virtual const String & | className () const override |
Name of the G3D::Model subclass. More... | |
bool | intersect (const Ray &R, const CoordinateFrame &cframe, float &maxDistance, Model::HitInfo &info=Model::HitInfo::ignore, const Entity *entity=nullptr, const Model::Pose *pose=nullptr) const override |
Determines if the ray intersects the heightfield and fills the info with the proper information. More... | |
virtual const String & | name () const override |
Name of the instance (usually based on the filename it is loaded from) More... | |
int64 | numVoxels () const |
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) override |
This will be replaced soon with a version that takes a shared_ptr<Pose>. More... | |
void | pose (Array< shared_ptr< Surface >> &surfaceArray, const shared_ptr< Entity > &entity=nullptr) const |
float | voxelRadius () const |
in meters More... | |
Static Public Member Functions | |
static shared_ptr< VoxelModel > | create (const String &name, const Specification &specification) |
static lazy_ptr< Model > | lazyCreate (const String &name, const Any &a) |
static lazy_ptr< Model > | lazyCreate (const VoxelModel::Specification &specification, const String &name) |
static void | setUseOptimizedIntersect (bool b) |
If true, complex models should use TriTree to accelerate intersect() calls where possible. More... | |
static bool | useOptimizedIntersect () |
Static Public Attributes | |
static int64 | voxelsRendered |
For debugging. More... | |
Protected Member Functions | |
VoxelModel (const String &name) | |
void | addVoxel (const Point3int16 position, const Color4unorm8 color) |
Only call during loading. More... | |
void | addVoxels (const ParseSchematic::ColorVoxels &voxels, Point3int32 minBound, Point3int32 maxBound, const Specification &specification) |
void | centerModel (const Point3int16 originOffset) |
void | computeBounds () |
void | copyToGPU () |
void | load (const Specification &spec) |
void | loadSchematic (const Specification &specification) |
void | loadVOX (const Specification &spec) |
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... | |
Protected Attributes | |
AABox | m_boxBounds |
In object space (not voxel space) More... | |
Array< Color4unorm8 > | m_cpuColor |
sRGBA8 More... | |
Array< Point3int16 > | m_cpuPosition |
Integers in voxel space. More... | |
AttributeArray | m_gpuColor |
sRGBA8 More... | |
AttributeArray | m_gpuPosition |
Integers TODO: Store in RGB16I. More... | |
String | m_name |
Sphere | m_sphereBounds |
In object space (not voxel space) More... | |
float | m_voxelRadius |
Meters. More... | |
Static Protected Attributes | |
static const int | CURRENT_CACHE_FORMAT = 3 |
Friends | |
class | VoxelSurface |
|
inlineprotected |
|
protected |
Only call during loading.
Called by addVoxels
|
protected |
|
protected |
|
inlineoverridevirtual |
Name of the G3D::Model subclass.
Implements G3D::Model.
|
protected |
|
protected |
|
static |
filename | .points or .ply file, or a directory containing multiple .ply files |
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
|
overridevirtual |
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 from G3D::Model.
|
static |
|
protected |
|
protected |
|
protected |
|
inlineoverridevirtual |
Name of the instance (usually based on the filename it is loaded from)
Implements G3D::Model.
|
inline |
|
overridevirtual |
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. |
Implements G3D::Model.
void G3D::VoxelModel::pose | ( | Array< shared_ptr< Surface >> & | surfaceArray, |
const shared_ptr< Entity > & | entity = nullptr |
||
) | const |
|
inlinestaticinherited |
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
|
inlinestaticinherited |
|
inline |
in meters
|
friend |
|
staticprotected |
|
protected |
In object space (not voxel space)
|
protected |
sRGBA8
|
protected |
Integers in voxel space.
Referenced by numVoxels().
|
protected |
sRGBA8
|
protected |
Integers TODO: Store in RGB16I.
|
protected |
In object space (not voxel space)
|
protected |
Meters.
Referenced by voxelRadius().
|
static |
For debugging.