Panda3D
Loading...
Searching...
No Matches
xFileAnimationSet.I
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 xFileAnimationSet.I
10 * @author drose
11 * @date 2004-10-04
12 */
13
14/**
15 *
16 */
17INLINE XFileAnimationSet::FrameEntry::
18FrameEntry() :
19 _scale(1.0, 1.0, 1.0),
20 _rot(LQuaterniond::ident_quat()),
21 _trans(LVector3d::zero()),
22 _mat(LMatrix4d::ident_mat())
23{
24}
25
26/**
27 * Returns the frame's data as a matrix, composing the matrix first if
28 * necessary, as indicated by the FrameData's _flags member.
29 */
30INLINE const LMatrix4d &XFileAnimationSet::FrameEntry::
31get_mat(int flags) const {
32 if ((flags & FDF_mat) == 0) {
33 ((FrameEntry *)this)->_mat = LMatrix4d::scale_mat(_scale) * _rot;
34 ((FrameEntry *)this)->_mat.set_row(3, _trans);
35 }
36 return _mat;
37}
38
39/**
40 *
41 */
42INLINE XFileAnimationSet::FrameData::
43FrameData() :
44 _flags(0)
45{
46}
const LMatrix4d & get_mat(int flags) const
Returns the frame's data as a matrix, composing the matrix first if necessary, as indicated by the Fr...