mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
Compile PandAI with ppremake
This commit is contained in:
parent
bd5e89e4a5
commit
fc4b36b1ec
82
contrib/src/ai/Sources.pp
Executable file
82
contrib/src/ai/Sources.pp
Executable file
@ -0,0 +1,82 @@
|
||||
#define LOCAL_LIBS contribbase
|
||||
#define BUILDING_DLL BUILDING_PANDAAI
|
||||
|
||||
#define OTHER_LIBS \
|
||||
panda:c \
|
||||
express:c putil:c pandabase:c pandaexpress:m \
|
||||
interrogatedb:c prc:c dconfig:c dtoolconfig:m \
|
||||
dtoolutil:c dtoolbase:c dtool:m
|
||||
|
||||
#begin lib_target
|
||||
#define TARGET pandaai
|
||||
|
||||
#define COMBINED_SOURCES ai_composite1.cxx
|
||||
|
||||
#define SOURCES \
|
||||
aiBehaviors.h \
|
||||
aiCharacter.h \
|
||||
aiGlobals.h \
|
||||
aiNode.h \
|
||||
aiPathFinder.h \
|
||||
aiWorld.h \
|
||||
arrival.h \
|
||||
config_ai.h \
|
||||
evade.h \
|
||||
flee.h \
|
||||
flock.h \
|
||||
globals.h \
|
||||
meshNode.h \
|
||||
obstacleAvoidance.h \
|
||||
pathFind.h \
|
||||
pathFollow.h \
|
||||
pursue.h \
|
||||
seek.h \
|
||||
wander.h
|
||||
|
||||
#define INCLUDED_SOURCES \
|
||||
aiBehaviors.cxx \
|
||||
aiCharacter.cxx \
|
||||
aiNode.cxx \
|
||||
aiPathFinder.cxx \
|
||||
aiWorld.cxx \
|
||||
ai_composite.cxx \
|
||||
ai_composite1.cxx \
|
||||
arrival.cxx \
|
||||
config_ai.cxx \
|
||||
evade.cxx \
|
||||
flee.cxx \
|
||||
flock.cxx \
|
||||
meshNode.cxx \
|
||||
obstacleAvoidance.cxx \
|
||||
pathFind.cxx \
|
||||
pathFollow.cxx \
|
||||
pursue.cxx \
|
||||
seek.cxx \
|
||||
wander.cxx
|
||||
|
||||
|
||||
#define INSTALL_HEADERS \
|
||||
aiBehaviors.h \
|
||||
aiCharacter.h \
|
||||
aiGlobals.h \
|
||||
aiNode.h \
|
||||
aiPathFinder.h \
|
||||
aiWorld.h \
|
||||
arrival.h \
|
||||
config_ai.h \
|
||||
evade.h \
|
||||
flee.h \
|
||||
flock.h \
|
||||
globals.h \
|
||||
meshNode.h \
|
||||
obstacleAvoidance.h \
|
||||
pathFind.h \
|
||||
pathFollow.h \
|
||||
pursue.h \
|
||||
seek.h \
|
||||
wander.h
|
||||
|
||||
#define IGATESCAN all
|
||||
|
||||
#end lib_target
|
||||
|
@ -502,7 +502,7 @@ void AIBehaviors::pause_ai(string ai_type) {
|
||||
}
|
||||
|
||||
case 8: {
|
||||
if (BT_obstacle_avoidance != NULL) {
|
||||
if (_obstacle_avoidance_obj != NULL) {
|
||||
turn_off("obstacle_avoidance");
|
||||
turn_off("obstacle_avoidance_activate");
|
||||
}
|
||||
|
@ -15,9 +15,6 @@
|
||||
#ifndef AICHARACTER_H
|
||||
#define AICHARACTER_H
|
||||
|
||||
#include "aiBehaviors.h"
|
||||
#include "aiWorld.h"
|
||||
|
||||
class AIBehaviors;
|
||||
class AIWorld;
|
||||
|
||||
@ -31,7 +28,7 @@ class AIWorld;
|
||||
// update.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class AICharacter {
|
||||
public:
|
||||
public:
|
||||
double _mass;
|
||||
double _max_force;
|
||||
LVecBase3f _velocity;
|
||||
|
@ -29,7 +29,7 @@
|
||||
// on the mesh.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class AINode {
|
||||
public:
|
||||
PUBLISHED:
|
||||
// This variable specifies whether the node is an obtacle or not.
|
||||
// Used for dynamic obstacle addition to the environment.
|
||||
// obstacle = false
|
||||
|
@ -32,7 +32,7 @@ AINode* find_in_mesh(NavMesh nav_mesh, LVecBase3f pos, int grid_size);
|
||||
// calculated using the manhattan method.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class PathFinder {
|
||||
public:
|
||||
PUBLISHED:
|
||||
AINode *_src_node;
|
||||
AINode *_dest_node;
|
||||
vector<AINode*> _open_list;
|
||||
|
@ -1,21 +1,20 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//! Filename : globals.h
|
||||
//! Created by : Deepak, John, Navin
|
||||
//! Date: 8 Sep 09
|
||||
//!
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//!
|
||||
//! PANDA3D SOFTWARE
|
||||
//! Copyright(c) Carnegie Mellon University. All rights reserved.
|
||||
//!
|
||||
//! All use of this software is subjest to the terms of the revised BSD
|
||||
//! license. You should have received a copy of this license along with this source code in a file named "LICENSE"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Filename: globals.h
|
||||
// Created by: Deepak, John, Navin (26Apr10)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
||||
//
|
||||
// All use of this software is subject to the terms of the revised BSD
|
||||
// license. You should have received a copy of this license along
|
||||
// with this source code in a file named "LICENSE."
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma warning (disable:4996)
|
||||
#pragma warning (disable:4005)
|
||||
#pragma warning(disable:4275)
|
||||
#pragma warning (disable:4275)
|
||||
|
||||
#ifndef _GLOBALS_H
|
||||
#define _GLOBALS_H
|
||||
|
@ -4,17 +4,17 @@
|
||||
|
||||
#include "globals.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//!
|
||||
//! Class : Node
|
||||
//! Description : This class is used to assign the nodes on the mesh. It holds all the data necessary to
|
||||
//! compute A* algorithm. It also maintains a lot of vital information such as the neighbor
|
||||
//! nodes of each node and also its position on the mesh.
|
||||
//! Note: The Mesh Generator which is a stand alone tool makes use of this class to generate the nodes on the
|
||||
//! mesh.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : Node
|
||||
// Description : This class is used to assign the nodes on the mesh.
|
||||
// It holds all the data necessary to compute A*
|
||||
// algorithm. It also maintains a lot of vital
|
||||
// information such as the neighbor nodes of each
|
||||
// node and also its position on the mesh.
|
||||
// Note: the Mesh Generator which is a stand alone
|
||||
// tool makes use of this class to generate the nodes
|
||||
// on the mesh.
|
||||
///////////////////////////////////////////////////////////////////
|
||||
class Node {
|
||||
public:
|
||||
// This variable specifies whether the node is an obtacle or not.
|
||||
|
13
contrib/src/contribbase/Sources.pp
Normal file
13
contrib/src/contribbase/Sources.pp
Normal file
@ -0,0 +1,13 @@
|
||||
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
|
||||
dtoolutil:c dtoolbase:c dtool:m prc:c
|
||||
|
||||
#begin lib_target
|
||||
#define TARGET contribbase
|
||||
|
||||
#define SOURCES \
|
||||
contribbase.cxx contribbase.h contribsymbols.h \
|
||||
|
||||
#define INSTALL_HEADERS \
|
||||
contribbase.h contribbase.h
|
||||
|
||||
#end lib_target
|
15
contrib/src/contribbase/contribbase.cxx
Normal file
15
contrib/src/contribbase/contribbase.cxx
Normal file
@ -0,0 +1,15 @@
|
||||
// Filename: contribbase.cxx
|
||||
// Created by: rdb (26Apr10)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
||||
//
|
||||
// All use of this software is subject to the terms of the revised BSD
|
||||
// license. You should have received a copy of this license along
|
||||
// with this source code in a file named "LICENSE."
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "contribbase.h"
|
Loading…
x
Reference in New Issue
Block a user