Panda3D
 All Classes Functions Variables Enumerations
userVertexTransform.I
1 // Filename: userVertexTransform.I
2 // Created by: drose (24Mar05)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: UserVertexTransform::get_name
18 // Access: Published
19 // Description: Returns the name passed to the constructor.
20 // Completely arbitrary.
21 ////////////////////////////////////////////////////////////////////
22 INLINE const string &UserVertexTransform::
23 get_name() const {
24  return _name;
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: UserVertexTransform::set_matrix
29 // Access: Published
30 // Description: Stores the indicated matrix.
31 ////////////////////////////////////////////////////////////////////
32 INLINE void UserVertexTransform::
33 set_matrix(const LMatrix4 &matrix) {
34  Thread *current_thread = Thread::get_current_thread();
35  CDWriter cdata(_cycler, true, current_thread);
36  cdata->_matrix = matrix;
37  mark_modified(current_thread);
38 }
39 
40 ////////////////////////////////////////////////////////////////////
41 // Function: UserVertexTransform::CData::Constructor
42 // Access: Public
43 // Description:
44 ////////////////////////////////////////////////////////////////////
45 INLINE UserVertexTransform::CData::
46 CData() :
47  _matrix(LMatrix4::ident_mat())
48 {
49 }
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: UserVertexTransform::CData::Copy Constructor
53 // Access: Public
54 // Description:
55 ////////////////////////////////////////////////////////////////////
56 INLINE UserVertexTransform::CData::
57 CData(const UserVertexTransform::CData &copy) :
58  _matrix(copy._matrix)
59 {
60 }
static Thread * get_current_thread()
Returns a pointer to the currently-executing Thread object.
Definition: thread.I:145
const string & get_name() const
Returns the name passed to the constructor.
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:451
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
A thread; that is, a lightweight process.
Definition: thread.h:51
void set_matrix(const LMatrix4 &matrix)
Stores the indicated matrix.