0 Members and 1 Guest are viewing this topic.
vs.rvel += crossp(_V(0, 0.01, 0), vs.rvel);
En gros, j'aimerais savoir comment créer un vecteur de déplacement relativement à mon vaisseau.
Le déplacement est un mécanisme de défense du moi. Il s'agit d'un mouvement de l'affect d'une représentation à une autre. ...
L'addition des vecteurs de déplacement Les déplacements qui se font le long d'une même droite sont appelés des «déplacements colinéaires». Ils peuvent aller dans le même sens (parallèles) ou dans le sens opposé (antiparallèles). L'addition de déplacements colinéaires peut se faire graphiquement ou mathématiquement.
et, surtout, son vecteur dépend encore de mon orientation...
Pour résumé, je veux créé une séparation de quelque chose top secret
void VESSEL::GetRotationMatrix ( MATRIX3 & R ) const Returns the current rotation matrix for transformations from the vessel's local frame of reference to the global frame. Parameters: R rotation matrix // que tu fournis vide , qui revient remplie par la fonctionNote:To transform a point rlocal from local vessel coordinates to a global point rglobal, the following formula is used: rglobal = R rlocal + pvessel, where pvessel is the vessel's global position. This transformation can be directly performed by a call to Local2Global.
void VESSEL::SetRotationMatrix ( const MATRIX3 & R ) const Applies a rotation by replacing the vessel's local to global rotation matrix. Parameters: R rotation matrix Note:The rotation matrix maps from the orientation of the vessel's local frame of reference to the orientation of the global frame (ecliptic at 2000.0). The user is responsible for providing a valid rotation matrix. The matrix must be orthogonal and normalised: the norms of all column vectors of R must be 1, and scalar products between any column vectors must be 0.
void VESSEL::GlobalRot ( const VECTOR3 & rloc, VECTOR3 & rglob ) const Performs a rotation of a direction from the local vessel frame to the global frame. Parameters:[in] rloc point in local vessel coordinates [out] rglob rotated point Note:[b]This function is equivalent to multiplying rloc with the rotation matrix returned by GetRotationMatrix. Should be used to transform directions.[/b] To transform points, use Local2Global, which additionally adds the vessel's global position to the rotated point.
AddForceAdd a custom body force.Synopsis:void AddForce (const VECTOR3 &F, const VECTOR3 &r) constParameters:F force vector [N]r force attack point [m]Notes:· This function can be used to implement custom forces (braking chutes,tethers, etc.). It should not be used for standard forces such as engine thrustor aerodynamic forces which are handled internally (although in theory thisfunction makes it possible to bypass Orbiter's built-in thrust andaerodynamics model completely and replace it by a user-defined model).· The force is applied only for the next time step. AddForce will thereforeusually be used inside the VESSEL2::clbkPreStep callback function.
VESSEL::VESSEL ( OBJHANDLE hVessel, int fmodel = 1 ) Creates a VESSEL interface instance from a vessel handle. Parameters: hVessel vessel handle fmodel level of realism requested (0=simple, 1=realistic) Note:This function creates an interface to an existing vessel. It does not create a new vessel. New vessels are created with the oapiCreateVessel and oapiCreateVesselEx functions. The VESSEL constructor (or the constructor of a derived specialised vessel class) will normally be invoked in the ovcInit callback function of a vessel module: class MyVessel: public VESSEL { // MyVessel interface definition }; DLLCLBK VESSEL *ovcInit (OBJHANDLE hvessel, int flightmodel) { return new MyVessel (hvessel, flightmodel); } DLLCLBK void ovcExit (VESSEL *vessel) { delete (MyVessel*)vessel; }The VESSEL interface instance created in ovcInit should be deleted in ovcExit.
oapiOpenInputBoxOpens a modal input box requesting a string from the user.Synopsis:void oapiOpenInputBox (char *title,bool (*Clbk)(void*,char*,void*),char *buf = 0,int vislen = 20,void *usrdata = 0)Parameters:title input box titleClbk callback function receiving the result of the user input (see notes)buf initial state of the input stringvislen number of characters visible in input boxusrdata user-defined data passed to the callback functionNotes:· Format for callback function:bool InputCallback (void *id, char *str, void *usrdata)where id identifies the input box, str contains the user-supplied string, andusrdata contains the data specified in the call to oapiOpenInputBox.The callback function should return true if it accepts the string, falseotherwise (the box will not be closed if the callback function returns false).· The box can be closed by the user by pressing Enter (“OK”) or Esc(“Cancel”). The callback function is only called in the first case.· The input box is modal, i.e. all keyboard input is redirected into the dialogbox. Normal key functions resume after the box is closed.
bonjour Spock,1- déclarer un fonction comme celle-ci :bool OutAddr (void *id, char *str, void *data){ sprintf(dts1.addrout,"%s",str); return 1;}ensuite, dans le "consume_buttons",if (bt==0) { oapiOpenInputBox ("Enter IP address :", OutAddr, 0, 15, (void*)this); }pour moi, dts1.addrout représente la variable de réception de ce que l'utilisateur rentre...bonne utilisationYves
#include "stdafx.h"#include "stdio.h"#include int _tmain(int argc, _TCHAR* argv[]){ ISpVoice * pVoice = NULL; if (FAILED(::CoInitialize(NULL))) return FALSE; HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice); if( SUCCEEDED( hr ) ) { pVoice->Speak(L"Coucou BiBi Uncle!!", 0, NULL); pVoice->Release(); pVoice = NULL; } ::CoUninitialize(); return 0;}
error C3867: &'ProjetSecret::FonctionSecrete' : liste d'arguments manquante dans l'appel de fonction ;utilisez 'ProjetSecret::FonctionSecrete' pour créer un pointeur vers membre
case OAPI_KEY_U: oapiOpenInputBox ("ENTER SECRET THING", FonctionSecrete, 0, 25, (void*)this); break;
bool ProjetSecret::FonctionSecrete (void *id, char *str, void *data){ char string[50]; sprintf(string,"%s",str); return 1;}
class ProjetSecret{public: [b]static[/b] bool FonctionSecrete (void *id, char *str, void *data);}