Lines Matching refs:Box3D

52 namespace Box3D {
77 inline int axis_to_int(Box3D::Axis axis) {
79 case Box3D::X:
81 case Box3D::Y:
83 case Box3D::Z:
85 case Box3D::NONE:
93 inline Proj::Axis toProj(Box3D::Axis axis) {
95 case Box3D::X:
97 case Box3D::Y:
99 case Box3D::Z:
101 case Box3D::NONE:
113 } // namespace Box3D
117 inline Box3D::Axis toAffine(Proj::Axis axis) {
120 return Box3D::X;
122 return Box3D::Y;
124 return Box3D::Z;
126 return Box3D::NONE;
129 return Box3D::NONE; // help compiler's flow analysis (-Werror=return-value)
135 namespace Box3D {
169 case 0: return Box3D::YZ ^ Box3D::FRONT;
170 case 1: return Box3D::XZ ^ Box3D::FRONT;
171 case 2: return Box3D::XY ^ Box3D::FRONT;
172 case 3: return Box3D::YZ ^ Box3D::REAR;
173 case 4: return Box3D::XZ ^ Box3D::REAR;
174 case 5: return Box3D::XY ^ Box3D::REAR;
176 return Box3D::NONE; // should not be reached
189 inline unsigned int number_of_axis_directions (Box3D::Axis axis) {
191 if (axis & Box3D::X) num++;
192 if (axis & Box3D::Y) num++;
193 if (axis & Box3D::Z) num++;
198 inline bool is_plane (Box3D::Axis plane) {
202 inline bool is_single_axis_direction (Box3D::Axis dir) {
211 inline Box3D::Axis third_axis_direction (Box3D::Axis dir1, Box3D::Axis dir2) {
212 return (Box3D::Axis) ((dir1 + dir2) ^ 0x7);
214 inline Box3D::Axis third_axis_direction (Box3D::Axis plane) {
215 return (Box3D::Axis) (plane ^ 0x7);
219 inline Box3D::Axis extract_first_axis_direction (Box3D::Axis dirs) {
220 if (dirs & Box3D::X) return Box3D::X;
221 if (dirs & Box3D::Y) return Box3D::Y;
222 if (dirs & Box3D::Z) return Box3D::Z;
223 return Box3D::NONE;
225 inline Box3D::Axis extract_second_axis_direction (Box3D::Axis dirs) {
226 return extract_first_axis_direction ((Box3D::Axis) (dirs ^ extract_first_axis_direction(dirs)));
229 inline Box3D::Axis orth_plane_or_axis (Box3D::Axis axis) {
230 return (Box3D::Axis) (Box3D::XYZ ^ axis);
234 inline Box3D::Axis get_perpendicular_axis_direction (Box3D::Axis dirs) {
235 if (!(dirs & Box3D::X)) return Box3D::X;
236 if (!(dirs & Box3D::Y)) return Box3D::Y;
237 if (!(dirs & Box3D::Z)) return Box3D::Z;
238 return Box3D::NONE;
241 char * string_from_axes (Box3D::Axis axis);
244 } // namespace Box3D