mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
build on linux
This commit is contained in:
parent
9ad64a6b4b
commit
dd28bafc68
@ -122,7 +122,7 @@ parse_rest(string &result) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
bool Shader::
|
||||
parse_eof(void) {
|
||||
return _text.size() == _parse;
|
||||
return (int)_text.size() == _parse;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -131,7 +131,7 @@ parse_eof(void) {
|
||||
// Description: Allocates an integer index to the given
|
||||
// shader parameter name.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE int Shader::
|
||||
int Shader::
|
||||
arg_index(const string &id) {
|
||||
for (int i=0; i<(int)(_args.size()); i++)
|
||||
if (_args[i] == id)
|
||||
|
@ -62,7 +62,6 @@ protected:
|
||||
private:
|
||||
Planef _plane;
|
||||
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
@ -79,6 +78,8 @@ public:
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
|
||||
friend class BoundingSphere;
|
||||
};
|
||||
|
||||
#include "boundingPlane.I"
|
||||
|
@ -63,7 +63,7 @@ xform(const LMatrix4f &mat) {
|
||||
|
||||
if (!is_empty() && !is_infinite()) {
|
||||
// First, determine the longest axis of the matrix, in case it
|
||||
// contains a non-proportionate scale.
|
||||
// contains a non-uniform scale.
|
||||
|
||||
/*
|
||||
LVector3f x,y,z;
|
||||
@ -439,6 +439,13 @@ contains_lineseg(const LPoint3f &a, const LPoint3f &b) const {
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BoundingSphere::contains_sphere
|
||||
// Access: Protected, Virtual
|
||||
// Description: Double-dispatch support: called by contains_other()
|
||||
// when the type we're testing for intersection is known
|
||||
// to be a sphere.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int BoundingSphere::
|
||||
contains_sphere(const BoundingSphere *sphere) const {
|
||||
nassertr(!is_empty() && !is_infinite(), 0);
|
||||
@ -462,12 +469,38 @@ contains_sphere(const BoundingSphere *sphere) const {
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BoundingSphere::contains_hexahedron
|
||||
// Access: Protected, Virtual
|
||||
// Description: Double-dispatch support: called by contains_other()
|
||||
// when the type we're testing for intersection is known
|
||||
// to be a hexahedron.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int BoundingSphere::
|
||||
contains_hexahedron(const BoundingHexahedron *hexahedron) const {
|
||||
return hexahedron->contains_sphere(this) & ~IF_all;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BoundingSphere::contains_line
|
||||
// Access: Protected, Virtual
|
||||
// Description: Double-dispatch support: called by contains_other()
|
||||
// when the type we're testing for intersection is known
|
||||
// to be a line.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int BoundingSphere::
|
||||
contains_line(const BoundingLine *line) const {
|
||||
return line->contains_sphere(this) & ~IF_all;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BoundingSphere::contains_plane
|
||||
// Access: Protected, Virtual
|
||||
// Description: Double-dispatch support: called by contains_other()
|
||||
// when the type we're testing for intersection is known
|
||||
// to be a plane.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int BoundingSphere::
|
||||
contains_plane(const BoundingPlane *plane) const {
|
||||
return plane->contains_sphere(this) & ~IF_all;
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ protected:
|
||||
virtual int contains_hexahedron(const BoundingHexahedron *hexahedron) const;
|
||||
virtual int contains_sphere(const BoundingSphere *sphere) const;
|
||||
virtual int contains_line(const BoundingLine *line) const;
|
||||
virtual int contains_plane(const BoundingPlane *plane) const;
|
||||
|
||||
private:
|
||||
LPoint3f _center;
|
||||
|
Loading…
x
Reference in New Issue
Block a user