Panda3D
vertexTransform.I
1 // Filename: vertexTransform.I
2 // Created by: drose (23Mar05)
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: VertexTransform::get_modified
18 // Access: Published
19 // Description: Returns a sequence number that's guaranteed to change
20 // at least every time the value reported by
21 // get_matrix() changes.
22 ////////////////////////////////////////////////////////////////////
24 get_modified(Thread *current_thread) const {
25  CDReader cdata(_cycler, current_thread);
26  return cdata->_modified;
27 }
28 
29 ////////////////////////////////////////////////////////////////////
30 // Function: VertexTransform::get_global_modified
31 // Access: Published, Static
32 // Description: Returns the currently highest
33 // VertexTransform::get_modified() value in the world.
34 // This can be used as a quick way to determine if any
35 // VertexTransforms have changed value recently.
36 ////////////////////////////////////////////////////////////////////
38 get_global_modified(Thread *current_thread) {
39  CDReader cdata(_global_cycler, current_thread);
40  return cdata->_modified;
41 }
42 
43 ////////////////////////////////////////////////////////////////////
44 // Function: VertexTransform::CData::Constructor
45 // Access: Public
46 // Description:
47 ////////////////////////////////////////////////////////////////////
48 INLINE VertexTransform::CData::
49 CData() {
50 }
51 
52 ////////////////////////////////////////////////////////////////////
53 // Function: VertexTransform::CData::Copy Constructor
54 // Access: Public
55 // Description:
56 ////////////////////////////////////////////////////////////////////
57 INLINE VertexTransform::CData::
58 CData(const VertexTransform::CData &copy) :
59  _modified(copy._modified)
60 {
61 }
62 
63 INLINE ostream &
64 operator << (ostream &out, const VertexTransform &obj) {
65  obj.output(out);
66  return out;
67 }
UpdateSeq get_modified(Thread *current_thread) const
Returns a sequence number that&#39;s guaranteed to change at least every time the value reported by get_m...
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
This is an abstract base class that holds a pointer to some transform, computed in some arbitrary way...
static UpdateSeq get_global_modified(Thread *current_thread)
Returns the currently highest VertexTransform::get_modified() value in the world. ...
A thread; that is, a lightweight process.
Definition: thread.h:51
This is a sequence number that increments monotonically.
Definition: updateSeq.h:43