19 TypeHandle EggSwitchConditionDistance::_type_handle;
25 EggSwitchConditionDistance::
26 EggSwitchConditionDistance(
double switch_in,
double switch_out,
27 const LPoint3d ¢er,
double fade) {
28 _switch_in = switch_in;
29 _switch_out = switch_out;
47 void EggSwitchConditionDistance::
48 write(std::ostream &out,
int indent_level)
const {
49 indent(out, indent_level) <<
"<SwitchCondition> {\n";
50 indent(out, indent_level+2)
51 <<
"<Distance> { " << _switch_in <<
" " << _switch_out;
57 out <<
" <Vertex> { " << _center <<
" } }\n";
58 indent(out, indent_level) <<
"}\n";
68 _center = _center * mat;
70 LVector3d in = LVector3d(_switch_in, 0.0, 0.0) * mat;
71 LVector3d out = LVector3d(_switch_out, 0.0, 0.0) * mat;
73 _switch_in = in.length();
74 _switch_out = out.length();