15 #include "eggSwitchCondition.h"
20 TypeHandle EggSwitchConditionDistance::_type_handle;
28 EggSwitchConditionDistance::
29 EggSwitchConditionDistance(
double switch_in,
double switch_out,
30 const LPoint3d ¢er,
double fade) {
31 _switch_in = switch_in;
32 _switch_out = switch_out;
54 void EggSwitchConditionDistance::
55 write(ostream &out,
int indent_level)
const {
56 indent(out, indent_level) <<
"<SwitchCondition> {\n";
57 indent(out, indent_level+2)
58 <<
"<Distance> { " << _switch_in <<
" " << _switch_out;
64 out <<
" <Vertex> { " << _center <<
" } }\n";
65 indent(out, indent_level) <<
"}\n";
77 _center = _center * mat;
83 _switch_out = out.
length();
This is a 4-by-4 transform matrix.
virtual void transform(const LMatrix4d &mat)
Applies the indicated transformation matrix to the switch condition parameters.
double length() const
Returns the length of the vector, by the Pythagorean theorem.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
TypeHandle is the identifier used to differentiate C++ class types.
This corresponds to a <SwitchCondition> entry within a group.
A SwitchCondition that switches the levels-of-detail based on distance from the camera's eyepoint...