Panda3D
Loading...
Searching...
No Matches
movingPartMatrix.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file movingPartMatrix.h
10 * @author drose
11 * @date 1999-02-23
12 */
13
14#ifndef MOVINGPARTMATRIX_H
15#define MOVINGPARTMATRIX_H
16
17#include "pandabase.h"
18
19#include "movingPart.h"
20#include "animChannel.h"
21#include "animChannelFixed.h"
22#include "cmath.h"
23
24EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_CHAN, EXPTP_PANDA_CHAN, MovingPart<ACMatrixSwitchType>);
25
26/**
27 * This is a particular kind of MovingPart that accepts a matrix each frame.
28 */
29class EXPCL_PANDA_CHAN MovingPartMatrix : public MovingPart<ACMatrixSwitchType> {
30protected:
31 INLINE MovingPartMatrix(const MovingPartMatrix &copy);
32
33public:
34 INLINE MovingPartMatrix(PartGroup *parent, const std::string &name,
35 const LMatrix4 &default_value);
36 virtual ~MovingPartMatrix();
37
39 virtual void get_blend_value(const PartBundle *root);
40
41 virtual bool apply_freeze_matrix(const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale);
42 virtual bool apply_control(PandaNode *node);
43
44protected:
45 INLINE MovingPartMatrix();
46
47public:
48 static void register_with_read_factory();
49
50 static TypedWritable *make_MovingPartMatrix(const FactoryParams &params);
51
52public:
53 virtual TypeHandle get_type() const {
54 return get_class_type();
55 }
56 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
57PUBLISHED:
58 static TypeHandle get_class_type() {
59 return _type_handle;
60 }
61public:
62 static void init_type() {
65 register_type(_type_handle, "MovingPartMatrix",
67 }
68
69private:
70 static TypeHandle _type_handle;
71};
72
73#include "movingPartMatrix.I"
74
75#endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Parent class for all animation channels.
This template class is a special kind of AnimChannel that always returns just one fixed value.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
This is a particular kind of MovingPart that accepts a matrix each frame.
This is the template instantiation of MovingPartBase, on the particular type of value provided by the...
Definition movingPart.h:27
virtual AnimChannelBase * make_default_channel() const
Creates and returns a new AnimChannel that is not part of any hierarchy, but that returns the default...
Definition movingPart.I:81
A basic node of the scene graph or data graph.
Definition pandaNode.h:65
This is the root of a MovingPart hierarchy.
Definition partBundle.h:46
This is the base class for PartRoot and MovingPart.
Definition partGroup.h:43
virtual bool apply_control(PandaNode *node)
Specifies a node to influence this particular joint so that it will always hold the node's transform.
static void register_with_read_factory()
Factory method to generate a PartGroup object.
virtual bool apply_freeze_matrix(const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale)
Freezes this particular joint so that it will always hold the specified transform.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
Base class for objects that can be written to and read from Bam files.
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(),...