117
117
bool COperator2Expr::IsInside(float x, float y, float z,bool bBorderInclude)
124
case VALUE_ADD_OPERATOR: {
125
// inside = first || second; // optimized with early out if first is inside
126
// todo: calculate smallest leaf first ! is much faster...
128
bool second;//first ;//,second;
130
//first = m_lhs->IsInside(x,y,z);
131
second = m_rhs->IsInside(x,y,z,bBorderInclude);
133
return true; //early out
135
// second = m_rhs->IsInside(x,y,z);
137
return m_lhs->IsInside(x,y,z,bBorderInclude);
142
case VALUE_SUB_OPERATOR: {
143
//inside = first && !second; // optimized with early out
144
// todo: same as with add_operator: calc smallest leaf first
146
bool second;//first ;//,second;
147
//first = m_lhs->IsInside(x,y,z);
148
second = m_rhs->IsInside(x,y,z,bBorderInclude);
152
// second space get subtracted -> negate!
153
//second = m_rhs->IsInside(x,y,z);
155
return (m_lhs->IsInside(x,y,z,bBorderInclude));
162
// not yet implemented, only add or sub csg operations
123
case VALUE_ADD_OPERATOR:
125
// inside = first || second; // optimized with early out if first is inside
126
// todo: calculate smallest leaf first ! is much faster...
128
bool second;//first ;//,second;
130
//first = m_lhs->IsInside(x,y,z);
131
second = m_rhs->IsInside(x,y,z,bBorderInclude);
133
return true; //early out
135
// second = m_rhs->IsInside(x,y,z);
137
return m_lhs->IsInside(x,y,z,bBorderInclude);
142
case VALUE_SUB_OPERATOR:
144
//inside = first && !second; // optimized with early out
145
// todo: same as with add_operator: calc smallest leaf first
147
bool second;//first ;//,second;
148
//first = m_lhs->IsInside(x,y,z);
149
second = m_rhs->IsInside(x,y,z,bBorderInclude);
153
// second space get subtracted -> negate!
154
//second = m_rhs->IsInside(x,y,z);
156
return (m_lhs->IsInside(x,y,z,bBorderInclude));
164
// not yet implemented, only add or sub csg operations
171
171
bool COperator2Expr::IsRightInside(float x, float y, float z,bool bBorderInclude)
173
173
return m_rhs->IsInside(x,y,z,bBorderInclude);