14 #ifndef TRANSFORMBLEND_H
15 #define TRANSFORMBLEND_H
54 void add_transform(
const VertexTransform *transform, PN_stdfloat weight);
56 void limit_transforms(
int max_transforms);
57 void normalize_weights();
61 INLINE
size_t get_num_transforms()
const;
63 MAKE_SEQ(get_transforms, get_num_transforms, get_transform);
64 INLINE PN_stdfloat get_weight(
size_t n)
const;
65 INLINE
void remove_transform(
size_t n);
67 INLINE
void set_weight(
size_t n, PN_stdfloat weight);
69 MAKE_SEQ_PROPERTY(transforms, get_num_transforms, get_transform,
70 set_transform, remove_transform);
71 MAKE_MAP_PROPERTY(weights, has_transform, get_weight);
72 MAKE_MAP_KEYS_SEQ(weights, get_num_transforms, get_transform);
74 INLINE
void update_blend(
Thread *current_thread)
const;
76 INLINE
void get_blend(LMatrix4 &result,
Thread *current_thread)
const;
78 INLINE
void transform_point(LPoint4f &point,
Thread *current_thread)
const;
79 INLINE
void transform_point(LPoint3f &point,
Thread *current_thread)
const;
80 INLINE
void transform_vector(LVector3f &point,
Thread *current_thread)
const;
82 INLINE
void transform_point(LPoint4d &point,
Thread *current_thread)
const;
83 INLINE
void transform_point(LPoint3d &point,
Thread *current_thread)
const;
84 INLINE
void transform_vector(LVector3d &point,
Thread *current_thread)
const;
87 MAKE_PROPERTY(modified, get_modified);
89 void output(std::ostream &out)
const;
90 void write(std::ostream &out,
int indent_level)
const;
95 void recompute_result(CData *cdata,
Thread *current_thread);
96 void clear_result(
Thread *current_thread);
98 class TransformEntry {
100 INLINE
bool operator < (
const TransformEntry &other)
const;
110 class EXPCL_PANDA_GOBJ CData :
public CycleData {
113 INLINE CData(
const CData ©);
116 return TransformBlend::get_class_type();
140 static void init_type() {
148 INLINE std::ostream &operator << (std::ostream &out,
const TransformBlend &obj);
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This template class calls PipelineCycler::read() in the constructor and PipelineCycler::release_read(...
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
A single page of data maintained by a PipelineCycler.
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
A thread; that is, a lightweight process.
get_current_thread
Returns a pointer to the currently-executing Thread object.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
This is a sequence number that increments monotonically.
An STL function object class, this is intended to be used on any ordered collection of class objects ...
This is our own Panda specialization on the default STL list.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...