Example #1
0
void CFace::GetTools(std::list<Tool*>* t_list, const wxPoint* p){
	face_for_tools = this;
	if(!wxGetApp().m_no_creation_mode)t_list->push_back(&make_sketch_tool);
	if(IsAPlane(NULL))
	{
		if(!wxGetApp().m_no_creation_mode)t_list->push_back(&make_coordsys);
		t_list->push_back(&rotate_to_face);
	}
	if(!wxGetApp().m_no_creation_mode)t_list->push_back(&extrude_face);
	//t_list->push_back(&intersector);
}
Example #2
0
void CFace::GetPlaneParams(gp_Pln &p)
{
	// returns a plane for the underlying surface
	BRepAdaptor_Surface surface(m_topods_face, Standard_True);
	GeomAbs_SurfaceType surface_type = surface.GetType();
	if(surface_type == GeomAbs_Plane)
	{
		p = surface.Plane();
	}
	else
	{
		IsAPlane(&p);
		if(	m_topods_face.Orientation()== TopAbs_REVERSED )
		{
			p = gp_Pln(p.Axis().Location(), -p.Axis().Direction());
			
		}
	}
}
Example #3
0
cell AMX_NATIVE_CALL TEST_Hook_OnPlayerExitVehicle(AMX* amx, cell* params)
{
	if(GetVehicleSpeed(params[2]) > 2.0) SaveCord[EnterCar[params[1]]] = 10;
	else
	{
		 float x[3];float z;
		 g_Invoke->callNative(&PAWN::GetVehiclePos,params[2],&x[0],&x[1],&x[2]);
		 g_Invoke->callNative(&PAWN::GetVehicleZAngle,params[2],&z);
		 Vehicle[params[2]].posx = x[0];
		 Vehicle[params[2]].posy = x[1];
		 Vehicle[params[2]].posz = x[2];
		 Vehicle[params[2]].posa = z;
	}
	EnterCar[params[1]] = -1;
	if(IsAPlane(params[2]))
       { 
            GunNoCheck[params[1]] = 4;
            PlayerWeapon[params[1]][46] = 1;
            PlayerAmmo[params[1]][46] = 1;
       }
	return 1;
}