15 #ifndef TRANSFORMBLEND_H 16 #define TRANSFORMBLEND_H 18 #include "pandabase.h" 19 #include "vertexTransform.h" 20 #include "pointerTo.h" 22 #include "ordered_vector.h" 23 #include "cycleData.h" 24 #include "cycleDataLockedReader.h" 25 #include "cycleDataReader.h" 26 #include "cycleDataWriter.h" 27 #include "pipelineCycler.h" 39 INLINE TransformBlend(
const VertexTransform *transform0, PN_stdfloat weight0);
40 INLINE TransformBlend(
const VertexTransform *transform0, PN_stdfloat weight0,
42 INLINE TransformBlend(
const VertexTransform *transform0, PN_stdfloat weight0,
45 INLINE TransformBlend(
const VertexTransform *transform0, PN_stdfloat weight0,
49 INLINE TransformBlend(
const TransformBlend ©);
50 INLINE
void operator = (
const TransformBlend ©);
51 INLINE ~TransformBlend();
53 int compare_to(
const TransformBlend &other)
const;
54 INLINE
bool operator < (
const TransformBlend &other)
const;
55 INLINE
bool operator == (
const TransformBlend &other)
const;
56 INLINE
bool operator != (
const TransformBlend &other)
const;
58 void add_transform(
const VertexTransform *transform, PN_stdfloat weight);
60 void limit_transforms(
int max_transforms);
61 void normalize_weights();
65 INLINE
int get_num_transforms()
const;
67 MAKE_SEQ(get_transforms, get_num_transforms, get_transform);
68 INLINE PN_stdfloat get_weight(
int n)
const;
70 INLINE
void set_weight(
int n, PN_stdfloat weight);
72 INLINE
void update_blend(
Thread *current_thread)
const;
74 INLINE
void get_blend(
LMatrix4 &result,
Thread *current_thread)
const;
76 INLINE
void transform_point(
LPoint4f &point,
Thread *current_thread)
const;
77 INLINE
void transform_point(
LPoint3f &point,
Thread *current_thread)
const;
78 INLINE
void transform_vector(
LVector3f &point,
Thread *current_thread)
const;
80 INLINE
void transform_point(
LPoint4d &point,
Thread *current_thread)
const;
81 INLINE
void transform_point(
LPoint3d &point,
Thread *current_thread)
const;
82 INLINE
void transform_vector(
LVector3d &point,
Thread *current_thread)
const;
86 void output(ostream &out)
const;
87 void write(ostream &out,
int indent_level)
const;
92 void recompute_result(CData *cdata,
Thread *current_thread);
93 void clear_result(
Thread *current_thread);
95 class TransformEntry {
97 INLINE
bool operator < (
const TransformEntry &other)
const;
107 class EXPCL_PANDA_GOBJ CData :
public CycleData {
110 INLINE CData(
const CData ©);
113 return TransformBlend::get_class_type();
137 static void init_type() {
138 register_type(_type_handle,
"TransformBlend");
145 INLINE ostream &operator << (ostream &out,
const TransformBlend &obj);
147 #include "transformBlend.I"
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is a four-component point in space.
A single page of data maintained by a PipelineCycler.
Base class for objects that can be written to and read from Bam files.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is our own Panda specialization on the default STL list.
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
This is a 4-by-4 transform matrix.
This template class calls PipelineCycler::read() in the constructor and PipelineCycler::release_read(...
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
An STL function object class, this is intended to be used on any ordered collection of class objects ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
This is a four-component point in space.
A thread; that is, a lightweight process.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
This is a sequence number that increments monotonically.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...