Support Forum       G3D Web Page     
Public Member Functions | Public Attributes | Static Protected Member Functions | List of all members
G3D::PointModel::PointArray Class Reference

A single Model stores multiple PointArrays so that they can become different Surfaces and culled (or possibly in the future, rigid-body animated) More...

Inherits G3D::ReferenceCountedObject.

Public Member Functions

void addPoint (const Point3 &position, const Color4unorm8 radiance)
 Only call during loading. More...
 
void centerPoints ()
 Called after loading by several of the loaders on m_pointArrayArray[0]. More...
 
void computeBounds ()
 
void copyToGPU ()
 
void randomize ()
 Randomizes the order of elements of cpuPosition and cpuRadiance. More...
 
int64 size () const
 

Public Attributes

AABox boxBounds
 
Array< Point3cpuPosition
 
Array< Color4unorm8cpuRadiance
 sRGBA8 More...
 
AttributeArray gpuPosition
 
AttributeArray gpuRadiance
 sRGBA8 More...
 
Sphere sphereBounds
 

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...
 

Detailed Description

A single Model stores multiple PointArrays so that they can become different Surfaces and culled (or possibly in the future, rigid-body animated)

Member Function Documentation

◆ addPoint()

void G3D::PointModel::PointArray::addPoint ( const Point3 position,
const Color4unorm8  radiance 
)

Only call during loading.

◆ centerPoints()

void G3D::PointModel::PointArray::centerPoints ( )

Called after loading by several of the loaders on m_pointArrayArray[0].

◆ computeBounds()

void G3D::PointModel::PointArray::computeBounds ( )

◆ copyToGPU()

void G3D::PointModel::PointArray::copyToGPU ( )

◆ createShared()

template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared ( ArgTypes &&...  args)
inlinestaticprotectedinherited

Like std::make_shared, but works for protected constructors.

Call as createShared<myclass>.

◆ randomize()

void G3D::PointModel::PointArray::randomize ( )

Randomizes the order of elements of cpuPosition and cpuRadiance.

◆ size()

int64 G3D::PointModel::PointArray::size ( ) const
inline

Member Data Documentation

◆ boxBounds

AABox G3D::PointModel::PointArray::boxBounds

◆ cpuPosition

Array<Point3> G3D::PointModel::PointArray::cpuPosition

Referenced by size().

◆ cpuRadiance

Array<Color4unorm8> G3D::PointModel::PointArray::cpuRadiance

sRGBA8

◆ gpuPosition

AttributeArray G3D::PointModel::PointArray::gpuPosition

◆ gpuRadiance

AttributeArray G3D::PointModel::PointArray::gpuRadiance

sRGBA8

◆ sphereBounds

Sphere G3D::PointModel::PointArray::sphereBounds

documentation generated on Wed Nov 24 2021 08:01:59 using doxygen 1.8.15