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;
86 INLINE
UpdateSeq get_modified(
Thread *current_thread = Thread::get_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...
A single page of data maintained by a PipelineCycler.
Base class for objects that can be written to and read from Bam files.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual TypeHandle get_parent_type() const
Returns the type of the container that owns the CycleData.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 ...
virtual void write_datagram(BamWriter *, Datagram &) const
Writes the contents of this object to the datagram for shipping out to a Bam file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This template class calls PipelineCycler::read() in the constructor and PipelineCycler::release_read(...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
An STL function object class, this is intended to be used on any ordered collection of class objects ...
A thread; that is, a lightweight process.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A class to retrieve the individual data elements previously stored in a Datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.