Support Forum       G3D Web Page     
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
G3D::FontModel Class Reference

Inherits G3D::Model.

Classes

class  Pose
 
class  Specification
 

Public Member Functions

virtual const StringclassName () const override
 Name of the G3D::Model subclass. More...
 
bool intersect (const Ray &R, const CoordinateFrame &cframe, float &maxDistance, Model::HitInfo &info, const Entity *entity, const Model::Pose *pose) const override
 Determines if the ray intersects the heightfield and fills the info with the proper information. More...
 
shared_ptr< FontModel::PosemodelPose ()
 
virtual const Stringname () const override
 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) override
 This will be replaced soon with a version that takes a shared_ptr<Pose>. More...
 

Static Public Member Functions

static shared_ptr< FontModelcreate (const FontModel::Specification &specification, const String &name)
 
static lazy_ptr< ModellazyCreate (const String &name, const Any &a)
 
static lazy_ptr< ModellazyCreate (const FontModel::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 ()
 

Protected Member Functions

 FontModel (const String &name)
 

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

shared_ptr< GFontfont
 We keep the font on the Model because we do not need to change it dynamically. More...
 
String m_name
 
shared_ptr< FontModel::Posem_pose
 

Friends

class TextSurface
 

Detailed Description

See also
TextSurface

Constructor & Destructor Documentation

◆ FontModel()

G3D::FontModel::FontModel ( const String name)
inlineprotected

Member Function Documentation

◆ className()

virtual const String& G3D::FontModel::className ( ) const
inlineoverridevirtual

Name of the G3D::Model subclass.

Implements G3D::Model.

◆ create()

static shared_ptr<FontModel> G3D::FontModel::create ( const FontModel::Specification specification,
const String name 
)
static

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

◆ intersect()

bool G3D::FontModel::intersect ( const Ray ray,
const CoordinateFrame cframe,
float &  maxDistance,
Model::HitInfo info,
const Entity entity,
const Model::Pose pose 
) const
overridevirtual

Determines if the ray intersects the heightfield and fills the info with the proper information.

Parameters
maxDistanceMax distance to trace to on input, hit distance written on output if hit

Reimplemented from G3D::Model.

◆ lazyCreate() [1/2]

static lazy_ptr<Model> G3D::FontModel::lazyCreate ( const String name,
const Any a 
)
static

◆ lazyCreate() [2/2]

static lazy_ptr<Model> G3D::FontModel::lazyCreate ( const FontModel::Specification specification,
const String name 
)
static

◆ modelPose()

shared_ptr<FontModel::Pose> G3D::FontModel::modelPose ( )
inline

◆ name()

virtual const String& G3D::FontModel::name ( ) const
inlineoverridevirtual

Name of the instance (usually based on the filename it is loaded from)

Implements G3D::Model.

◆ pose()

virtual void G3D::FontModel::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 
)
overridevirtual

This will be replaced soon with a version that takes a shared_ptr<Pose>.

Parameters
poseMust have the subclass of Model::Pose appropriate to the Model subclass.

Implements G3D::Model.

◆ setUseOptimizedIntersect()

static void G3D::Model::setUseOptimizedIntersect ( bool  b)
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

◆ useOptimizedIntersect()

static bool G3D::Model::useOptimizedIntersect ( )
inlinestaticinherited

Friends And Related Function Documentation

◆ TextSurface

friend class TextSurface
friend

Member Data Documentation

◆ font

shared_ptr<GFont> G3D::FontModel::font
protected

We keep the font on the Model because we do not need to change it dynamically.

◆ m_name

String G3D::FontModel::m_name
protected

Referenced by name().

◆ m_pose

shared_ptr<FontModel::Pose> G3D::FontModel::m_pose
protected

Referenced by modelPose().


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