g4tools  5.4.0
Public Member Functions | Public Attributes | List of all members
tools::sg::normal Class Reference
Inheritance diagram for tools::sg::normal:
Inheritance graph
[legend]
Collaboration diagram for tools::sg::normal:
Collaboration graph
[legend]

Public Member Functions

virtual const desc_fieldsnode_desc_fields () const
 
virtual void render (render_action &a_action)
 
 normal ()
 
virtual ~normal ()
 
 normal (const normal &a_from)
 
normaloperator= (const normal &a_from)
 
- Public Member Functions inherited from tools::sg::node
virtual void * cast (const std::string &a_class) const
 
virtual const std::string & s_cls () const =0
 
virtual nodecopy () const =0
 
virtual unsigned int cls_version () const
 
virtual void pick (pick_action &)
 
virtual void bbox (bbox_action &)
 
virtual void search (search_action &a_action)
 
virtual void get_matrix (get_matrix_action &a_action)
 
virtual bool write (write_action &a_action)
 
virtual void event (event_action &)
 
virtual bool read (read_action &a_action)
 
virtual void is_visible (visible_action &)
 
virtual void protocol_one_fields (std::vector< field * > &a_fields) const
 
virtual bool draw_in_frame_buffer () const
 
virtual bool touched ()
 
virtual void reset_touched ()
 
 node ()
 
virtual ~node ()
 
void touch ()
 
fieldfield_from_desc (const field_desc &a_desc) const
 
void dump_field_descs (std::ostream &a_out) const
 
fieldfind_field_by_name (const std::string &a_name) const
 

Public Attributes

sf_vec3f vec
 

Additional Inherited Members

- Protected Member Functions inherited from tools::sg::node
 node (const node &)
 
nodeoperator= (const node &)
 
void add_field (field *a_field)
 
bool write_fields (write_action &a_action)
 
bool read_fields (read_action &a_action)
 
field_desc::offset_t field_offset (const field *a_field) const
 
fieldfind_field (const field_desc &a_rdesc) const
 
void check_fields (std::ostream &a_out) const
 

Detailed Description

Definition at line 16 of file normal.

Constructor & Destructor Documentation

◆ normal() [1/2]

tools::sg::normal::normal ( )
inline

Definition at line 39 of file normal.

40  :parent()
41  ,vec(vec3f(0,0,1))
42  {
43  add_fields();
44  }

◆ ~normal()

virtual tools::sg::normal::~normal ( )
inlinevirtual

Definition at line 45 of file normal.

45 {}

◆ normal() [2/2]

tools::sg::normal::normal ( const normal a_from)
inline

Definition at line 47 of file normal.

48  :parent(a_from)
49  ,vec(a_from.vec)
50  {
51  add_fields();
52  }

Member Function Documentation

◆ node_desc_fields()

virtual const desc_fields& tools::sg::normal::node_desc_fields ( ) const
inlinevirtual

Reimplemented from tools::sg::node.

Definition at line 21 of file normal.

21  {
23  static const desc_fields s_v(parent::node_desc_fields(),1, //WARNING : take care of count.
25  );
26  return s_v;
27  }

◆ operator=()

normal& tools::sg::normal::operator= ( const normal a_from)
inline

Definition at line 53 of file normal.

53  {
54  parent::operator=(a_from);
55  vec = a_from.vec;
56  return *this;
57  }

◆ render()

virtual void tools::sg::normal::render ( render_action a_action)
inlinevirtual

Reimplemented from tools::sg::node.

Definition at line 33 of file normal.

33  {
34  state& state = a_action.state();
35  state.m_normal = vec.value();
36  a_action.normal(state.m_normal);
37  }

Member Data Documentation

◆ vec

sf_vec3f tools::sg::normal::vec

Definition at line 19 of file normal.


The documentation for this class was generated from the following file:
tools::sg::normal::vec
sf_vec3f vec
Definition: normal:19
tools::sg::normal
Definition: normal:16
TOOLS_FIELD_DESC_NODE_CLASS
#define TOOLS_FIELD_DESC_NODE_CLASS(a__class)
Definition: field:68
tools::sg::bsf::value
T & value()
Definition: bsf:98
TOOLS_ARG_FIELD_DESC
#define TOOLS_ARG_FIELD_DESC(a__field)
Definition: field:71