本文整理汇总了C++中creation函数的典型用法代码示例。如果您正苦于以下问题:C++ creation函数的具体用法?C++ creation怎么用?C++ creation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了creation函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: node
/// Less operator, needed for maps
bool operator<(const port<Alloc>& rhs) const {
int n = node().compare(rhs.node());
if (n > 0) return true;
if (n < 0) return false;
if (id() < rhs.id()) return true;
if (id() > rhs.id()) return false;
if (creation() < rhs.creation()) return true;
if (creation() > rhs.creation()) return false;
return false;
}
开发者ID:fredrikelinder,项目名称:eixx,代码行数:11,代码来源:port.hpp
示例2: catchEntity
void RS_ActionDrawLineTangent2::mouseMoveEvent(QMouseEvent* e) {
// RS_DEBUG->print("RS_ActionDrawLineTangent2::mouseMoveEvent begin");
if(getStatus() != SetCircle2) return;
circle2= catchEntity(e, circleType, RS2::ResolveAll);
if(circle2==NULL) return;
if(circle2->rtti()!=RS2::EntityCircle &&
circle2->rtti()!=RS2::EntityEllipse &&
circle2->rtti()!=RS2::EntityArc
) {
circle2=NULL;
return;
}
RS_Creation creation(NULL, NULL);
RS_Vector mouse(graphicView->toGraphX(e->x()),
graphicView->toGraphY(e->y()));
tangent.reset(creation.createTangent2(mouse,
circle1,
circle2));
if(tangent.get()==NULL) {
valid=false;
return;
}
valid=true;
lineData.reset(new RS_LineData(tangent->getData()));
deletePreview();
preview->addEntity(new RS_Line(preview.get(), *lineData));
drawPreview();
}
开发者ID:CERobertson,项目名称:LibreCAD,代码行数:29,代码来源:rs_actiondrawlinetangent2.cpp
示例3: creation
ContinuousExtendedKalmanFilter::ContinuousExtendedKalmanFilter(int numSystemStatesIn,int numSystemInputsIn,int numSystemMeasuresIn)
{
creation(numSystemStatesIn,numSystemInputsIn,numSystemMeasuresIn);
initTime=0.0;
actualTime=0.0;
return;
}
开发者ID:Hendranus,项目名称:cvg_ardrone2_ibvs,代码行数:7,代码来源:extendedKalmanFilter.cpp
示例4: snapPoint
void RS_ActionDrawLinePolygon::mouseMoveEvent(RS_MouseEvent* e) {
RS_DEBUG->print("RS_ActionDrawLinePolygon::mouseMoveEvent begin");
RS_Vector mouse = snapPoint(e);
switch (getStatus()) {
case SetCenter:
break;
case SetCorner:
if (center.valid) {
corner = mouse;
deletePreview();
clearPreview();
RS_Creation creation(preview, NULL, false);
creation.createPolygon(center, corner, number);
drawPreview();
}
break;
default:
break;
}
}
开发者ID:Akaur,项目名称:qdraw,代码行数:26,代码来源:rs_actiondrawlinepolygon.cpp
示例5: mouse
void RS_ActionDrawLineOrthTan::mouseMoveEvent(QMouseEvent* e) {
RS_DEBUG->print("RS_ActionDrawLineOrthTan::mouseMoveEvent begin");
if( getStatus() != SetCircle ) return;
RS_Vector mouse(graphicView->toGraphX(e->x()),
graphicView->toGraphY(e->y()));
RS_Entity* en ;
en = catchEntity(e, circleList, RS2::ResolveAll);
if (en!=NULL && (en->rtti()==RS2::EntityCircle ||
en->rtti()==RS2::EntityArc ||
en->rtti()==RS2::EntityEllipse)) {
circle = en;
RS_Creation creation(NULL, NULL);
RS_Line* t = creation.createLineOrthTan(mouse,
normal,
circle);
if (t!=NULL) {
if (tangent!=NULL) {
delete tangent;
tangent=NULL;
}
tangent = (RS_Line*)t->clone();
deletePreview();
preview->addEntity(t);
drawPreview();
}
}
RS_DEBUG->print("RS_ActionDrawLineOrthTan::mouseMoveEvent end");
}
开发者ID:0825732889,项目名称:LibreCAD,代码行数:33,代码来源:rs_actiondrawlineorthtan.cpp
示例6: gLoadMultiBodyFromUrdf
static int gLoadMultiBodyFromUrdf(lua_State *L)
{
int argc = lua_gettop(L);
if (argc==4)
{
if (!lua_isuserdata(L,1))
{
std::cerr << "error: first argument to b3CreateRigidbody should be world";
return 0;
}
luaL_checktype(L,3, LUA_TTABLE);
btVector3 pos = getLuaVectorArg(L,3);
btQuaternion orn = getLuaQuaternionArg(L,4);
btDiscreteDynamicsWorld* world = (btDiscreteDynamicsWorld*) lua_touserdata(L,1);
if (world != sLuaDemo->m_dynamicsWorld)
{
std::cerr << "error: first argument expected to be a world";
return 0;
}
const char* fileName = lua_tostring(L,2);
#if 1
BulletURDFImporter u2b(sLuaDemo->m_guiHelper);
bool loadOk = u2b.loadURDF(fileName);
if (loadOk)
{
b3Printf("loaded %s OK!", fileName);
btTransform tr;
tr.setIdentity();
tr.setOrigin(pos);
tr.setRotation(orn);
int rootLinkIndex = u2b.getRootLinkIndex();
// printf("urdf root link index = %d\n",rootLinkIndex);
MyMultiBodyCreator creation(sLuaDemo->m_guiHelper);
bool m_useMultiBody = true;
ConvertURDF2Bullet(u2b,creation, tr,sLuaDemo->m_dynamicsWorld,m_useMultiBody,u2b.getPathPrefix());
btMultiBody* mb = creation.getBulletMultiBody();
if (mb)
{
lua_pushlightuserdata (L, mb);
return 1;
}
} else
{
b3Printf("can't find %s",fileName);
}
#endif
}
return 0;
}
开发者ID:Ochakko,项目名称:MameBake3D,代码行数:60,代码来源:LuaPhysicsSetup.cpp
示例7: snapPoint
void RS_ActionDrawLinePolygonCorCor::mouseMoveEvent(QMouseEvent* e) {
RS_DEBUG->print("RS_ActionDrawLinePolygon2::mouseMoveEvent begin");
RS_Vector mouse = snapPoint(e);
switch (getStatus()) {
case SetCorner1:
break;
case SetCorner2:
if (corner1.valid) {
corner2 = mouse;
deletePreview();
RS_Creation creation(preview.get(), NULL, false);
creation.createPolygon2(corner1, corner2, number);
drawPreview();
}
break;
default:
break;
}
}
开发者ID:PlastecProfiles,项目名称:LibreCAD,代码行数:25,代码来源:rs_actiondrawlinepolygon2.cpp
示例8: creation
QgsProcessingAlgorithm *QgsProcessingAlgorithm::create( const QVariantMap &configuration ) const
{
std::unique_ptr< QgsProcessingAlgorithm > creation( createInstance() );
creation->setProvider( provider() );
creation->initAlgorithm( configuration );
return creation.release();
}
开发者ID:ccrook,项目名称:Quantum-GIS,代码行数:7,代码来源:qgsprocessingalgorithm.cpp
示例9: RS_Vector
void RS_ActionDrawLineParallel::mouseMoveEvent(QMouseEvent* e) {
RS_DEBUG->print("RS_ActionDrawLineParallel::mouseMoveEvent begin");
coord = RS_Vector(graphicView->toGraphX(e->x()),
graphicView->toGraphY(e->y()));
entity = catchEntity(e, RS2::ResolveAll);
switch (getStatus()) {
case SetEntity: {
deletePreview();
RS_Creation creation(preview.get(), nullptr, false);
creation.createParallel(coord,
distance, number,
entity);
drawPreview();
}
break;
default:
break;
}
RS_DEBUG->print("RS_ActionDrawLineParallel::mouseMoveEvent end");
}
开发者ID:Harpalus,项目名称:LibreCAD,代码行数:27,代码来源:rs_actiondrawlineparallel.cpp
示例10: u2b
bool PhysicsServer::loadUrdf(const char* fileName, const btVector3& pos, const btQuaternion& orn,
bool useMultiBody, bool useFixedBase)
{
MyURDFImporter u2b(m_guiHelper);
bool loadOk = u2b.loadURDF(fileName);
if (loadOk)
{
b3Printf("loaded %s OK!", fileName);
btTransform tr;
tr.setIdentity();
tr.setOrigin(pos);
tr.setRotation(orn);
int rootLinkIndex = u2b.getRootLinkIndex();
// printf("urdf root link index = %d\n",rootLinkIndex);
MyMultiBodyCreator creation(m_guiHelper);
ConvertURDF2Bullet(u2b,creation, tr,m_dynamicsWorld,useMultiBody,u2b.getPathPrefix());
btMultiBody* mb = creation.getBulletMultiBody();
return true;
}
return false;
}
开发者ID:RodionovAlexey,项目名称:bullet3,代码行数:26,代码来源:PhysicsServer.cpp
示例11: creation
void RS_ActionBlocksCreate::trigger() {
if (graphic!=nullptr) {
RS_BlockList* blockList = graphic->getBlockList();
if (blockList!=nullptr) {
RS_BlockData d =
RS_DIALOGFACTORY->requestNewBlockDialog(blockList);
if (!d.name.isEmpty()) {
RS_Creation creation(container, graphicView);
creation.createBlock(&d, referencePoint, true);
RS_InsertData id(
d.name,
referencePoint,
RS_Vector(1.0,1.0),
0.0,
1, 1, RS_Vector(0.0,0.0)
);
creation.createInsert(&id);
}
}
}
graphicView->redraw(RS2::RedrawDrawing);
setStatus(getStatus()+1); // clear mouse button hints
updateMouseButtonHints();
// if(RS_DIALOGFACTORY!=nullptr){
// RS_DIALOGFACTORY->requestPreviousToolBar();
// }
graphicView->killSelectActions();
finish(false);
}
开发者ID:Harpalus,项目名称:LibreCAD,代码行数:33,代码来源:rs_actionblockscreate.cpp
示例12: snapPoint
void RS_ActionDrawLinePolygonCenCor::mouseMoveEvent(QMouseEvent* e) {
RS_DEBUG->print("RS_ActionDrawLinePolygon::mouseMoveEvent begin");
RS_Vector mouse = snapPoint(e);
switch (getStatus()) {
case SetCenter:
break;
case SetCorner:
if (pPoints->center.valid) {
pPoints->corner = mouse;
deletePreview();
RS_Creation creation(preview.get(), nullptr, false);
creation.createPolygon(pPoints->center, pPoints->corner, number);
drawPreview();
}
break;
default:
break;
}
}
开发者ID:Joeycc,项目名称:LibreCAD,代码行数:25,代码来源:rs_actiondrawlinepolygon.cpp
示例13: catchEntity
void RS_ActionDrawLineTangent2::mouseMoveEvent(QMouseEvent* e) {
// RS_DEBUG->print("RS_ActionDrawLineTangent2::mouseMoveEvent begin");
e->accept();
if(getStatus() != SetCircle2) return;
RS_Entity* en= catchEntity(e, circleType, RS2::ResolveAll);
if(!en || en==circle1) return;
if(circle2){
circle2->setHighlighted(false);
graphicView->drawEntity(circle2);
}
circle2=en;
circle2->setHighlighted(true);
graphicView->drawEntity(circle2);
RS_Creation creation(nullptr, nullptr);
RS_Vector mouse(graphicView->toGraphX(e->x()),
graphicView->toGraphY(e->y()));
tangent.reset(creation.createTangent2(mouse,
circle1,
circle2));
if(!tangent.get()){
valid=false;
return;
}
valid=true;
lineData.reset(new RS_LineData(tangent->getData()));
deletePreview();
preview->addEntity(new RS_Line(preview.get(), *lineData));
drawPreview();
}
开发者ID:dinkel,项目名称:LibreCAD,代码行数:30,代码来源:rs_actiondrawlinetangent2.cpp
示例14: QMainWindow
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
ui(new Ui::MainWindow) {
ui->setupUi(this);
creation();
configuration();
loadSettings();
}
开发者ID:cedoduarte,项目名称:DCCommunication,代码行数:7,代码来源:mainwindow.cpp
示例15: creation
QgsProcessingAlgorithm *QgsProcessingAlgorithm::create( const QVariantMap &configuration ) const
{
std::unique_ptr< QgsProcessingAlgorithm > creation( createInstance() );
if ( ! creation )
throw QgsProcessingException( QObject::tr( "Error creating algorithm from createInstance()" ) );
creation->setProvider( provider() );
creation->initAlgorithm( configuration );
return creation.release();
}
开发者ID:dmarteau,项目名称:QGIS,代码行数:9,代码来源:qgsprocessingalgorithm.cpp
示例16: deletePreview
void RS_ActionLibraryInsert::trigger() {
deletePreview();
RS_Creation creation(container, graphicView);
creation.createLibraryInsert(data);
graphicView->redraw(RS2::RedrawDrawing);
}
开发者ID:beginner1,项目名称:LibreCAD,代码行数:9,代码来源:rs_actionlibraryinsert.cpp
示例17: creation
int Matrix::deletion(void)
{
if(data!=0)
{
delete[] data;
}
creation(0,0);
return 1;
}
开发者ID:MorS25,项目名称:ardrone_rrt_avoid,代码行数:10,代码来源:matrixLib.cpp
示例18: deletePreview
void RS_ActionDrawImage::trigger() {
deletePreview();
if (!pImg->data.file.isEmpty()) {
RS_Creation creation(container, graphicView);
creation.createImage(& pImg->data);
}
graphicView->redraw(RS2::RedrawDrawing);
finish(false);
}
开发者ID:Joeycc,项目名称:LibreCAD,代码行数:11,代码来源:rs_actiondrawimage.cpp
示例19: deletePreview
void RS_ActionDrawLinePolygonCorCor::trigger() {
RS_PreviewActionInterface::trigger();
deletePreview();
RS_Creation creation(container, graphicView);
bool ok = creation.createPolygon2(corner1, corner2, number);
if (!ok) {
RS_DEBUG->print("RS_ActionDrawLinePolygon2::trigger:"
" No polygon added\n");
}
}
开发者ID:PlastecProfiles,项目名称:LibreCAD,代码行数:13,代码来源:rs_actiondrawlinepolygon2.cpp
示例20: creation
void RS_ActionDrawLineParallel::trigger() {
RS_PreviewActionInterface::trigger();
RS_Creation creation(container, graphicView);
RS_Entity* e = creation.createParallel(coord,
distance, number,
entity);
if (e==nullptr) {
RS_DEBUG->print("RS_ActionDrawLineParallel::trigger:"
" No parallels added\n");
}
}
开发者ID:Harpalus,项目名称:LibreCAD,代码行数:13,代码来源:rs_actiondrawlineparallel.cpp
注:本文中的creation函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论