示例#1
0
void
AsdkBody::createAxisRevolution(
    const AcGePoint3d vertices[],
    PolygonVertexData* vertexData[],
    int numVertices,
    const AcGeVector3d &normal,
    const AcGePoint3d &axisStart,
    const AcGePoint3d &axisEnd,
    double revolutionAngle,
    int approx,
    const AcGePoint3d &fixedPt,
    double scaleFactor,
    double twistAngle)
{
	assertWriteEnabled();
    m_3dGeom = Body::axisRevolution(
        (Point3d*)vertices,
        vertexData,
        numVertices,
        *(Vector3d*)&normal,
        Line3d(axisStart, axisEnd),
        revolutionAngle * (kPi/180),
        approx,
        *(Point3d*)&fixedPt,
        scaleFactor,
        twistAngle * (kPi/180));
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#2
0
int32_t Debugger::traceStatementExecution(void)
{
	bool halt = step;
	//--------------------------------------
	// Do we have a breakpoint on this line?
	if(breakPointManager)
	{
		if(breakPointManager->isBreakPoint(execLineNumber))
		{
			sprintf(message, "HIT BP: (%d) %s [%d]", module->getId(), module->getName(), execLineNumber);
			print(message);
			halt = true;
		}
	}
//	if (trace) {
//		message[0] = nullptr;
//		sprintLineNumber(message);
//		print(message);
//	}
	//------------------------------------------------------------------
	// If we've hit a breakpoint or are currently halted due to
	// some other debugging thingy, wait for another debugger command...
	if(halt)
		debugMode();
	return(ABL_NO_ERR);
}
示例#3
0
int32_t Debugger::traceDataStore(SymTableNodePtr id, TypePtr idType, StackItemPtr target, TypePtr targetType)
{
	//SymTableNodePtr idPtr = debugModule->findSymbol(strParam1);
	//if (!idPtr) {
	//			print("Unknown identifier in current scope.\n");
	//			return;
	//		}
	//		char message[255];
	//		sprintSymbolValue(message, idPtr);
	//		print(message);
	//		}
	if(id->info && ((WatchPtr)id->info)->store)
	{
		char valString[255];
		sprintDataValue(valString, target, targetType);
		if(idType->form == FRM_ARRAY)
			sprintf(message, "STORE: (%d) %s [%d] -> %s[#] = %s\n", module->getId(), module->getName(), execLineNumber, id->name, valString);
		//else if (idType->form == FRM_RECORD)
		//	sprintf(message, "STORE AT LINE %d - %s.# = %s\n", execLineNumber, id->name, valString);
		else
			sprintf(message, "STORE: (%d) %s [%d] -> %s = %s\n", module->getId(), module->getName(), execLineNumber, id->name, valString);
		print(message);
		if(((WatchPtr)id->info)->breakOnStore)
			debugMode();
	}
	return(ABL_NO_ERR);
}
示例#4
0
void 
AsdkBody::createExtrusionAlongPath(
    const Body &startProfile, 
    const Body &endProfile,
	const AcGePoint3d vertices[], 
    PolygonVertexData* vertexData[], 
    int numVertices, 
    bool pathIsClosed,
    bool bCheckValidity,
    const AcGePoint3d &scaleTwistFixedPt,
    double scaleFactor, 
    double twistAngle, 
    const MorphingMap &morphingMap)
{
	assertWriteEnabled();
	m_3dGeom = Body::extrusionAlongPath(
        startProfile, 
        endProfile, 
        (Point3d*)vertices, 
        vertexData, 
        numVertices, 
        pathIsClosed, 
        bCheckValidity, 
        *(Point3d*)&scaleTwistFixedPt, 
        scaleFactor, 
        twistAngle * (kPi/180), 
        morphingMap);
    if (debugMode())
    {
        m_3dGeom.mergeCoplanarEntities();
	    if (! m_3dGeom.isValid())
            throw eFail;
    }
}
示例#5
0
void 
AsdkBody::createSphere(const AcGePoint3d& p, double radius, int approx)
{
	assertWriteEnabled();
    m_3dGeom = Body::sphere( *(Point3d*)&p, radius, approx);
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#6
0
void 
AsdkBody::createBox(const AcGePoint3d& p, const AcGeVector3d& vec)
{
	assertWriteEnabled();
    m_3dGeom = Body::box(*(Point3d*)&p, *(Vector3d*)&vec);
    if (debugMode())
        if (! m_3dGeom.isValid())
            throw eFail;
}
示例#7
0
/** @brief Passes the control to the debug-window for a last time.

This function **must** be called *once* *after* all cvv calls if any. As an alternative create an
instance of FinalShowCaller, which calls finalShow() in its destructor (RAII-style).
 */
inline void finalShow()
{
#ifdef CVVISUAL_DEBUGMODE
	if (debugMode())
	{
		impl::finalShow();
	}
#endif
}
示例#8
0
void 
AsdkBody::createConvexHull(const AcGePoint3d vertices[], int numVertices)
{
	assertWriteEnabled();
	m_3dGeom = Body::convexHull((Point3d*)vertices, numVertices);
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#9
0
void 
AsdkBody::createTetrahedron(const AcGePoint3d& p1, const AcGePoint3d& p2,
    const AcGePoint3d& p3, const AcGePoint3d& p4)
{
	assertWriteEnabled();
    m_3dGeom = Body::tetrahedron(*(Point3d*)&p1, *(Point3d*)&p2,
	    *(Point3d*)&p3, *(Point3d*)&p4);
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#10
0
/**
 * @brief Use the debug-framework to compare two images (from which the second
 * is intended to be the result of
 * a filter applied to the first).
 */
static inline void
debugFilter(cv::InputArray original, cv::InputArray result,
            impl::CallMetaData metaData = impl::CallMetaData(),
            const char *description = nullptr, const char *view = nullptr)
{
	if (debugMode())
	{
		impl::debugFilter(original, result, metaData, description,
		                  view);
	}
}
示例#11
0
/** @overload */
static inline void debugFilter(cv::InputArray original, cv::InputArray result,
                               impl::CallMetaData metaData,
                               const ::std::string &description,
                               const ::std::string &view = "")
{
	if (debugMode())
	{
		impl::debugFilter(original, result, metaData,
		                  description.c_str(), view.c_str());
	}
}
示例#12
0
Local void examineMacro(struct LOC_scanMusic *LINK)
{
  if (!countMacro())
    return;
  if (debugMode())
    printf("%s: ", LINK->note);
  if (strlen(LINK->note) == 1) {
    LINK->mlen = LINK->bar_length - LINK->old_length;
    if (LINK->macroID < 1 || LINK->macroID > 20)
      error3(LINK->voice, "Invalid macro ID");
    macro_length[LINK->macroID-1] = LINK->mlen;
    if (debugMode())
      printf("Ending macro %d of type %c, length=%d\n",
	     LINK->macroID, LINK->macro_type, LINK->mlen);
    if (LINK->macro_type == 'S')
      LINK->bar_length = LINK->old_length;
    LINK->store_macro = false;
    return;
  }
  LINK->playID = identifyMacro(LINK->note, LINK);
  if (LINK->playID < 1 || LINK->playID > 20)
    error3(LINK->voice, "Invalid macro ID");
  if (LINK->note[1] == 'P') {
    if (debugMode())
      printf("Playing macro %d of length %d\n",
	     LINK->playID, macro_length[LINK->playID-1]);
    LINK->bar_length += macro_length[LINK->playID-1];
    return;
  }
  if (pos1(LINK->note[1], "SR") <= 0)
    return;
  LINK->old_length = LINK->bar_length;
  LINK->macro_type = LINK->note[1];
  LINK->macroID = LINK->playID;
  LINK->store_macro = true;
  if (debugMode())
    printf("Defining macro %d of type %c\n", LINK->macroID, LINK->note[1]);
}
示例#13
0
void 
AsdkBody::createCylinder(const AcGePoint3d& axisStart, const AcGePoint3d& axisEnd, 
    const AcGeVector3d& baseNormal, double radius, int approx)
{
	assertWriteEnabled();
    m_3dGeom = Body::cylinder(
        Line3d(*(Point3d*)&axisStart, *(Point3d*)&axisEnd), 
        *(Vector3d*)&baseNormal, 
        radius, 
        approx);
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#14
0
static inline void
debugDMatch(cv::InputArray img1, std::vector<cv::KeyPoint> keypoints1,
            cv::InputArray img2, std::vector<cv::KeyPoint> keypoints2,
            std::vector<cv::DMatch> matches, const impl::CallMetaData &data,
            const char *description = nullptr, const char *view = nullptr,
            bool useTrainDescriptor = true)
{
	if (debugMode())
	{
		impl::debugDMatch(img1, std::move(keypoints1), img2,
		                  std::move(keypoints2), std::move(matches),
		                  data, description, view, useTrainDescriptor);
	}
}
示例#15
0
void 
AsdkBody::createPyramid(
    const AcGePoint3d vertices[], 
    PolygonVertexData *vertexData[],
    int numVertices, 
    const AcGeVector3d &plgNormal, 
    const AcGePoint3d &apex)
{
	assertWriteEnabled();
	m_3dGeom = Body::pyramid((Point3d*)vertices, vertexData, numVertices, 
        *(Vector3d*)&plgNormal, *(Point3d*)&apex);
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#16
0
void
AsdkBody::createSkin(
    AsdkBody* profiles[],
    int numProfiles,
    bool isClosed,
    MorphingMap* morphingMaps[])
{
	assertWriteEnabled();
    bool checkPlanarity = debugMode() ? TRUE : FALSE;
    Body **profileBodies = new Body*[numProfiles];
    
    for (int i = 0; i < numProfiles; i++)
        profileBodies[i] = &(profiles[i]->body());

    m_3dGeom = Body::skin(
        profileBodies,
        numProfiles,
        isClosed,
        checkPlanarity,
        morphingMaps);
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#17
0
void 
AsdkBody::createTorus(const AcGePoint3d& axisStart, const AcGePoint3d& axisEnd,
    double majorRadius, double minorRadius, int majorApprox, int minorApprox)
{
	assertWriteEnabled();
    m_3dGeom = Body::torus(
        Line3d(*(Point3d*)&axisStart, *(Point3d*)&axisEnd),
        majorRadius, 
        minorRadius, 
        majorApprox, 
        minorApprox);

    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#18
0
void 
AsdkBody::createReducingElbow(
    const AcGePoint3d& elbowCenter, 
    const AcGePoint3d& endCenter1,
    const AcGePoint3d& endCenter2, 
    double endRadius1, 
    double endRadius2,
    int majorApprox,
    int minorApprox)
{
    assertWriteEnabled();                                                   
	m_3dGeom = Body::reducingElbow(*(Point3d*)&elbowCenter, *(Point3d*)&endCenter1, 
        *(Point3d*)&endCenter2, endRadius1, endRadius2, majorApprox, minorApprox);
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#19
0
文件: World2D.cpp 项目: Jopnal/Jopnal
    void World2D::draw(const ProjectionInfo& proj, const LightContainer&) const
    {
    #ifdef JOP_DEBUG_MODE

        if (debugMode())
        {
            m_dd->m_proj = &proj;
            m_worldData2D->DrawDebugData();
            m_dd->flushLines();
        }

    #else

        camera;

    #endif
    }
示例#20
0
int32_t Debugger::traceDataFetch(SymTableNodePtr id, TypePtr idType, StackItemPtr data)
{
	TypePtr idTypePtr = id->typePtr;
	if(id->info && ((WatchPtr)id->info)->fetch)
	{
		char valString[255];
		sprintDataValue(valString, data, idType);
		if(idTypePtr->form == FRM_ARRAY)
			sprintf(message, "FETCH: (%d) %s [%d] - %s[#] = %s\n", module->getId(), module->getName(), execLineNumber, id->name, valString);
		//else if (idTypePtr->form == FRM_RECORD)
		//	sprintf(message, "STORE AT LINE %d - %s.# = %s\n", id->name, valString);
		else
			sprintf(message, "FETCH: (%d) %s [%d] - %s = %s\n", module->getId(), module->getName(), execLineNumber, id->name, valString);
		print(message);
		if(((WatchPtr)id->info)->breakOnFetch)
			debugMode();
	}
	return(ABL_NO_ERR);
}
示例#21
0
void 
AsdkBody::createExtrusion(
    const AcGePoint3d vertices[], 
    PolygonVertexData* vertexData[],
	int numVertices, 
    const AcGeVector3d &plgNormal, 
    const AcGeVector3d &extrusionVector, 
    const AcGePoint3d &fixedPt,
	double scaleFactor, 
    double twistAngle)
{
	assertWriteEnabled();
	m_3dGeom = Body::extrusion((Point3d*)vertices, vertexData, numVertices, 
        *(Vector3d*)&plgNormal, *(Vector3d*)&extrusionVector, *(Point3d*)&fixedPt, 
        scaleFactor, twistAngle * (kPi/180));
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#22
0
void
AsdkBody::createEndpointRevolution(
    const AcGePoint3d vertices[],
    PolygonVertexData* vertexData[],
    int numVertices,
    const AcGeVector3d &normal,
    double revolutionAngle,
    int approx)
{
	assertWriteEnabled();
    m_3dGeom = Body::endpointRevolution(
        (Point3d*)vertices,
        vertexData,
        numVertices,
        *(Vector3d*)&normal,
        revolutionAngle * (kPi/180),
        approx);
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#23
0
void 
AsdkBody::createPipeConic(
    const AcGePoint3d& axisStart, 
    const AcGePoint3d& axisEnd,
    const AcGeVector3d& baseNormal,
    double outerRadius1, 
    double innerRadius1, 
    double outerRadius2, 
    double innerRadius2,
    int approx)
{
	assertWriteEnabled();
	m_3dGeom = Body::pipeConic(
        Line3d(*(Point3d*)&axisStart, *(Point3d*)&axisEnd),
        *(Vector3d*)&baseNormal,
	    outerRadius1, 
        innerRadius1, 
        outerRadius2, 
        innerRadius2, 
        approx);
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#24
0
void 
AsdkBody::createRectToCircleReducer(
    const AcGePoint3d& baseCorner, 
    const AcGeVector2d& baseSizes,
	const AcGePoint3d& circleCenter, 
    const AcGeVector3d& circleNormal, 
    double circleRadius,
    int approx)
{
	assertWriteEnabled();
	m_3dGeom = 
    Body::rectangleToCircleReducer(
        *(Point3d*)&baseCorner, 
        *(Vector2d*)&baseSizes,
		Circle3d(
            Line3d(
                *(Point3d*)&circleCenter, 
                *(Vector3d*)&circleNormal), 
            circleRadius), 
        approx);
    if (debugMode())
	    if (! m_3dGeom.isValid())
            throw eFail;
}
示例#25
0
int  bbGfxModeWidth( int n ){
	debugMode( n );
	return gfx_modes[n-1].w;
}
示例#26
0
int  bbGfxModeHeight( int n ){
	debugMode( n );
	return gfx_modes[n-1].h;
}
示例#27
0
void scanMusic(voice_index voice_, short *left_over)
{
  struct LOC_scanMusic V;
  Char buf[256], enote[256], xnote[256];
  boolean has_next = false, done = false;
  Char dur1, lastdur;
  music_word nscan;
  Char STR1[256];

  V.voice = voice_;
  strcpy(terminators, "d.x");
  resetInfo(V.voice, buf);
  *left_over = 0;
  V.store_macro = false;
  V.bar = full_bar;
  V.bar_length = 0;
  V.ngrace = 0;
  V.nmulti = 0;
  if (meternum == 0)
    V.bar = 32000;
  dur1 = duration(V.voice);
  lastdur = dur1;
  do {
    getNextMusWord(buf, V.note, &nscan);
    if (*V.note == '\0')
      break;
    V.count = 0;
    /*    if isNoteOrRest(note) and not (isPause(note) or isMultibarRest(note))
          then note:=toStandard(note); */
    V.doublex = (pos1('D', V.note) > 0);
    if (nscan == mword) {
      if (*V.note == '\0')
	error3(V.voice, "You may not end a line with a meter change");
      if (V.bar_length > 0)
	error3(V.voice, "Meter change only allowed at start of bar");
      else
	V.bar = barLength(V.note);
    } else if (nscan == rword) {
      if (!(isPause(V.note) || isMultiBarRest(V.note))) {
	processNote(V.note, xnote, dur1, &lastdur, &V.count);
	checkSticky(V.note, rest_attrib[V.voice-1]);
      }
    }
    if (*V.note != '\0')
      appendNote(V.voice, nscan);
    strcpy(enote, V.note);
    if (nscan == macro || nscan == endmacro)
      examineMacro(&V);
    if (nscan == abcdefg) {
      if (!multi_bar_rest && V.ngrace + V.nmulti == 0) {
	processNote(enote, xnote, dur1, &lastdur, &V.count);
	if (*xnote != '\0') {
	  checkSticky(enote, note_attrib[V.voice-1]);
	  appendToLine(V.voice, enote);
	  appendNote(V.voice, nscan);
	  strcpy(enote, xnote);
	}
	checkSticky(enote, note_attrib[V.voice-1]);
      }
    }
    appendToLine(V.voice, enote);
    if (*V.note == '\0')   /* !!! else word_bound[here]:=length(line); */
      done = true;
    sprintf(STR1, "%c", barsym);
    if (!strcmp(V.note, STR1)) {
      if (meternum == 0)
	error3(V.voice, "You may not use bar lines in barless music");
      else if (V.bar_length == 0)
	markBar(V.voice);
      else if (numberOfBars(V.voice) == 0 && V.bar_length < V.bar) {
	if (has_next)
	  has_next = false;   /*Should check whether pickups are equal*/
	else if (*left_over > 0)
	  error3(V.voice, "Bar is too short");
	*left_over = V.bar_length;
	V.bar_length = 0;
      }
    }
    if (nscan == nextvoice) {
      if (V.bar_length > 0)
	error3(V.voice, "Next voice before bar is full");
      else
	barForward(V.voice, -1);
      has_next = true;
    } else if (isPause(V.note))
      V.bar_length += V.bar;
    else if (!multi_bar_rest) {   /*do nothing*/
      if (!done && isNoteOrRest(V.note))
	countIt(&V);
      else
	maybeGroup(&V);
    }
    dur1 = lastdur;
    if (V.bar_length >= V.bar && V.ngrace + V.nmulti == 0 && !V.store_macro) {
      if (debugMode())
	printf("%d %d\n", V.voice, V.bar_length);
      barForward(V.voice, V.bar_length / V.bar);
      V.bar_length %= V.bar;
/* p2c: mtx.pas, line 268:
 * Note: Using % for possibly-negative arguments [317] */
    }
  } while (!done);
  setExtraLength(V.voice, V.bar_length);
  resetDuration(V.voice, dur1);
  regroup(V.voice);
}
示例#28
0
int  bbGfxModeDepth( int n ){
	debugMode( n );
	return gfx_modes[n-1].d;
}
示例#29
0
int  bbGfxMode3D( int n ){
	debugMode( n );
	return gfx_modes[n-1].caps & gxRuntime::GFXMODECAPS_3D ? 1 :0;
}
示例#30
0
static inline void debugDilate(ocv::InputArray in, ocv::OutputArray out,
		impl::CallData data = impl::CallData()){
	if(debugMode()) {
		impl::debugDilate(in, out, data);
	}
}