21 #ifndef PT_COMPLETE_STATE_H
22 #define PT_COMPLETE_STATE_H
54 std::numeric_limits<double>::
max()),
64 std::numeric_limits<double>::
max()),
89 <<
" " << std::setw(16) << std::setprecision(8) << cs.
body_dir
104 if(dir2[1] < 0) ang = -ang;
124 cs.face_dir[1], cs.face_dir[0] + cs.body_dir, 0.0,
150 Vector p(0.5*girth*cos(angle), 0.5*width*sin(angle));
159 const Complete_state& cs,
169 const Complete_state& cs,
173 std::vector<Vector>& fpts,
174 std::vector<Vector>& bpts,
183 const Complete_state& cs,
192 const Complete_state& cs,
201 const Complete_state& cs,
Vector rotate(const Vector &v) const
Definition: g_quaternion.cpp:565
Complete_state()
Construct an empty (and invalid) complete state.
Definition: pt_complete_state.h:51
Int_matrix::Value_type max(const Int_matrix &mat)
Return the maximum value in this matrix.
Definition: l_int_matrix.h:1397
Vector head_to_world(const Vector &vh, const Head &h, bool scale=false)
Converts a point on the head to world coordinates.
Definition: pt_complete_state.h:210
double body_direction(const Vector &dir)
Gets the body direction from a direction vector.
Definition: pt_complete_state.h:96
Quaternion orientation
Definition: pt_complete_state.h:116
std::vector< Vector > head_points(const Complete_state &cs, double height, double width, double girth)
Sample points on head surface.
Definition: pt_complete_state.cpp:117
Vector_d< D > normalized() const
Non-mutating (functionally pure) version of normalize()
Definition: m_vector_d.impl.h:384
height
Definition: APPgetLargeConnectedEdges.m:33
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
Simple struct representing a head.
Definition: pt_complete_state.h:110
Head(const Complete_state &cs, double h, double w, double g)
Definition: pt_complete_state.h:118
Vector center
Definition: pt_complete_state.h:115
Vector3 position
Definition: pt_complete_state.h:44
St_perspective_camera for modeling a perspective camera using the classic Forsyth and Ponce parametri...
Vector2 face_dir
Definition: pt_complete_state.h:46
std::vector< Vector > face_features(const Complete_state &cs, double height, double width, double girth)
Location of face features.
Definition: pt_complete_state.cpp:162
Definition: g_quaternion.h:40
static const double HEIGHT_FRACTION
Definition: pt_complete_state.h:128
static const double GIRTH_FRACTION
Definition: pt_complete_state.h:130
std::vector< Vector > body_ellipse(const Complete_state &cs, double h, double w, double g, size_t n=12)
Computes points on ellipse given by position and dimensions.
Definition: pt_complete_state.cpp:44
static const double WIDTH_FRACTION
Definition: pt_complete_state.h:129
Complete_state(const Vector3 &pos)
Construct a (invalid) complete state with the given position.
Definition: pt_complete_state.h:60
double girth
Definition: pt_complete_state.h:114
Value_type magnitude() const
Return this vector's magnitude.
Definition: m_vector.h:1490
bool face_com
Definition: pt_complete_state.h:48
double body_dir
Definition: pt_complete_state.h:45
Vector visible_head_point(const Complete_state &cs, const Vector &cam_center, double height, double width, double girth)
Find a point on face which is visible from the camera.
Definition: pt_complete_state.cpp:211
double width
Definition: pt_complete_state.h:113
std::ostream & operator<<(std::ostream &ost, const Complete_state &cs)
outputs the Complete_state.
Definition: pt_complete_state.h:86
double height
Definition: pt_complete_state.h:112
Vector ellipse_point(const Complete_state &cs, double height, double width, double girth, double angle)
Compute point on ellipse given body_dir and angle.
Definition: pt_complete_state.h:136
This class implements matrices, in the linear-algebra sense, with real-valued elements.
Definition: m_matrix.h:94
const Vector * attn_point
Definition: pt_complete_state.h:47
void scale(kjb::Axis_aligned_rectangle_2d &box, const kjb::Vector &s)
Definition: gr_2D_bounding_box.cpp:108
Definition for the Vector class, a thin wrapper on the KJB Vector struct and its related functionalit...
void cylinder_points(const Complete_state &cs, double height, double width, double girth, std::vector< Vector > &fpts, std::vector< Vector > &bpts, Vector &botc, Vector &topc, Vector &bodc)
Points on body cylinders.
Definition: pt_complete_state.cpp:65
Represents the state of an actor at a frame.
Definition: pt_complete_state.h:42