A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/hit__matrix__graph_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/hit_matrix/hit_matrix_graph.cpp Source File

58

: m_HitElem(&hit_elem),

93  if

(

fabs

(x2 - x1) < scale_x &&

fabs

(y2 - y1) < scale_y){

95

x1 = 0.5 * (x2 + x1 - scale_x);

98

y1 = 0.5 * (y2 + y1 - scale_y);

162 inline double square

(

double

x) {

return

pow(x, 2); }

183  double

alpha = atan2((

double

)(p2.

Y

() - p1.

Y

()), (

double

)(p2.

X

() - p1.

X

()));

184  double

max_proj = sqrt(

square

(p2.

Y

() - p1.

Y

()) +

square

(p2.

X

() - p1.

X

()));

186  double

beta = atan2((

double

)(pt.

Y

() - p1.

Y

()), (

double

)(pt.

X

() - p1.

X

()));

187  double

hyp = sqrt(

square

(pt.

Y

() - p1.

Y

()) +

square

(pt.

X

() - p1.

X

()));

188  double

angle = beta - alpha;

190  double

proj = hyp * cos(angle);

191  if

(proj >= 0 && proj <= max_proj) {

192  double

ortho_d =

fabs

( hyp * sin(angle));

195  double

d2 = sqrt(

square

(pt.

Y

() - p2.

Y

()) +

square

(pt.

X

() - p2.

X

()));

196  return min

(hyp, d2);

250  double

k = double(y2 - y1) / (x2 - x1);

251  double b

= y1 - k * x1;

290  for

(

size_t i

= 0;

i

<

size

;

i

++ ) {

302  int

end_s = start_s + len_s;

303  int

end_q = start_q + len_q;

330

it->SetColorIndex(index);

340  for

(

int i

= 0;

i

<

size

- 1; ) {

346  for

(

int i

= 0;

i

<

size

;

i

++ ) {

370

: m_CurrColorIndex(0),

371

m_ColoringParams(

NULL

),

374

m_SelColor(0.5

f

, 0.5

f

, 1.0

f

, 1.0

f

),

375

m_HighLightColor(0.8

f

, 0.8

f

, 1.0

f

, 0.5),

376

m_PathColor(0.2

f

, 0.2

f

, 0.2

f

, 1.0

f

),

377

m_ProjLinesColor(0.8

f

, 0.8

f

, 1.0

f

, 0.25

f

),

378

m_ProjBackColor(0.8

f

, 0.8

f

, 1.0

f

, 0.25

f

),

379

m_DrawConnections(

false

),

417

(*it)->SetSelected(

false

);

466  CGlAttrGuard

guard(GL_LINE_BIT | GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT );

469

gl.

BlendFunc

(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

471

gl.

Enable

(GL_LINE_SMOOTH);

487

gl.

Begin

(GL_LINES);

492  const TVPRect

& rc_b = (*it)->m_Bounds;

498  bool

tiny_x = rc_b.

Width

() < scale_x;

499  bool

tiny_y = rc_b.

Height

() < scale_y;

524  if

(itE->IsSelected()) {

528  int

ind = itE->GetColorIndex();

551

gl.

Enable

(GL_LINE_STIPPLE);

555

gl.

Begin

(GL_LINES);

614  CGlAttrGuard

guard(GL_LINE_BIT | GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT );

617

gl.

BlendFunc

(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

619

gl.

Enable

(GL_LINE_SMOOTH);

623

gl.

Color4d

(0.8, 0.8, 0.8, 0.5);

625

gl.

Begin

(GL_LINES);

631  if

(! (*itE)->IsSelected()) {

632  int

ind = (*itE)->GetColorIndex();

646

TPath::const_iterator it1 = path.begin();

647

TPath::const_iterator it2 = ++it1;

648  while

( it2 != path.end() ) {

650

(*it2)->StartVertex();

663  CGlAttrGuard

guard(GL_LINE_BIT | GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT );

666

gl.

BlendFunc

(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

671

gl.

Begin

(GL_QUADS);

681

gl.

Begin

(GL_LINES);

688

gl.

Enable

(GL_LINE_SMOOTH);

693

gl.

Begin

(GL_LINES);

712

gl.

Color3f

(0.0f, 0.0f, 0.0f);

715

gl.

Enable

(GL_LINE_STIPPLE);

727

gl.

Begin

(GL_LINES);

770  for

(

size_t i

= 0;

i

< num_glyphs;

i

++ ){

776

ind = (

int

) floor( norm * colors_n );

777

ind =

min

( ind, colors_n - 1 );

784  for

(

size_t i

= 0;

i

< num_glyphs;

i

++ ){

864  if

(event.Dragging()) {

866

wxPoint ms_pos =

event

.GetPosition();

971  double

d = itE->GetDistPixels(*

m_Pane

, pt);

972  if

(! p_hit_elem || d < min_d ) {

974

p_hit_elem = &(*itE);

996  double

d = itE->GetDistPixels(*

m_Pane

, pt);

997  if

(! p_hit_elem || d < min_d ) {

999

p_hit_elem = &(*itE);

1005

(*it)->SetSelected(

false

);

1041  bool ok

= itE->Intersects(*

m_Pane

, rc);

1043  if

(neg && (itE->IsSelected())) {

1044

itE->SetSelected(

false

);

1047

itE->SetSelected(

true

);

static EGUIState wxGetSelectState(const wxMouseEvent &event)

CGlAttrGuard - guard class for restoring OpenGL attributes.

CHitElemGlyph is a simple graphical object representing a Hit Element.

double GetDistPixels(CGlPane &pane, const TVPPoint &pt) const

return shortest distance in pixels from the given point in viewport to the graphical representation o...

void GetModelRect(TModelRect &rc) const

void Render(CGlPane &pane, ERenderingPass what)

void SetSelected(bool b_set)

bool InRect(CGlPane &pane, const TVPRect &rc) const

returns true if hit is contained by the given rectangle (in VP coordinates)

bool Intersects(CGlPane &pane, const TVPRect &rc) const

returns true if hit is intersected by the given rectangle (in VP coordinates)

const IHitElement * m_HitElem

CHitElemGlyph(const IHitElement &hit_elem)

CHitGlyph is a simple graphical object representing a Hit as a set of corresponding Hit Elements.

CHitGlyph(const IHit &p_hit)

c'tor creates child CHitElemGlyph-s

vector< CHitElemGlyph > TElemGlyphCont

TElemGlyphCont & GetElems()

void Render(CGlPane &pane, CHitElemGlyph::ERenderingPass what)

void SetColorIndex(int index)

CRgbaColor m_HighLightColor

void OnMotion(wxMouseEvent &event)

list< CHitElemGlyph * > TPath

THitGlyphVector m_vGlyphs

void x_CancelSelRectMode()

CRgbaGradColorTable m_ColorTable

IHitMatrixGraphHost * m_Host

event handling

void DrawConnections(bool draw)

virtual void x_RenderPath(CGlPane &pane)

bool x_SelectTest() const

CRgbaColor m_ProjLinesColor

void OnLeftUp(wxMouseEvent &event)

CRgbaColor m_ProjBackColor

void AssignColorsByScore(const SHitColoringParams *params)

virtual void SetPane(CGlPane *pane)

virtual void x_RenderSelection(CGlPane &pane)

const CRgbaColor & GetColorByIndex(int index)

void Render(CGlPane &pane)

void SelectGlyph(const CHitGlyph &glyph)

virtual void DeleteGlyphs()

const SHitColoringParams * m_ColoringParams

virtual wxEvtHandler * GetEvtHandler()

void x_OnSelectCursor(void)

CRgbaColor m_DefaultColor

void OnLeftDown(wxMouseEvent &event)

event handlers

virtual void x_RenderEventHandler(CGlPane &pane)

void OnMouseCaptureLost(wxMouseCaptureLostEvent &evt)

void OnKeyEvent(wxKeyEvent &event)

virtual void CreateGlyph(const IHit &hit_elem)

vector< CHitGlyph * > THitGlyphVector

bool x_SelectByPoint(bool b_inc, bool toggle)

bool m_MoveDuringSelection

@ eSelRect

selecting a single glyph by point

void x_SelectByRect(bool inc, bool neg)

inc - incremental, "neg" - negative (toggle select)

bool x_IsColoringEnabled()

void ResetGlyphSelection()

IGenericHandlerHost * GetGenericHost()

virtual void x_RenderHits(CGlPane &pane)

TElemGlyphSet m_SelGlyphs

primary storage for glyphs

int m_CurrColorIndex

rendering state

TPathCont m_Paths

set of selected Glyphs (hit elements)

void SetHost(IHitMatrixGraphHost *host)

class CRgbaColor provides a simple abstraction for managing colors.

virtual void GHH_ReleaseMouse()=0

releases captured mouse

virtual void GHH_Redraw()=0

redraws the Host and the handler

virtual void GHH_CaptureMouse()=0

captures mouse events in the hosting window for D&D

virtual void GHH_SetCursor(const wxCursor &cursor)=0

changes the cursor in the hosting window

virtual TSeqPos GetQueryLength() const =0

virtual TSignedSeqPos GetQueryStart() const =0

virtual TSeqPos GetSubjectLength() const =0

virtual objects::ENa_strand GetSubjectStrand() const =0

virtual objects::ENa_strand GetQueryStrand() const =0

virtual TSignedSeqPos GetSubjectStart() const =0

virtual TVPUnit HMGH_GetVPPosByY(int y) const =0

virtual void HMGH_OnChanged(void)=0

virtual TDim GetElemsCount() const =0

virtual const IHitElement & GetElem(TDim elem_index) const =0

iterator_bool insert(const value_type &val)

static const char * bounds[]

unsigned int TSeqPos

Type for sequence locations and lengths.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define NON_CONST_ITERATE(Type, Var, Cont)

Non constant version of ITERATE macro.

void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)

void destroy_and_erase_elems(ContT &C)

void SetSize(T width, T height)

virtual void Enable(GLenum glstate)=0

virtual void LineStipple(GLint factor, GLushort pattern)=0

Set line stipple pattern: glLineStipple(). Deprecated in gl 3.2+.

virtual void Begin(GLenum mode)=0

Start rendering.

virtual void BlendFunc(GLenum sfactor, GLenum dfactor)=0

Options to be used when GL_BLEND is enabled.

void Color3f(GLfloat r, GLfloat g, GLfloat b)

TModelPoint UnProject(TVPUnit m_x, TVPUnit m_y) const

IRender & GetGl()

convenience function for getting current render manager

void Vertex2d(GLdouble x, GLdouble y)

TVPRect & GetViewport(void)

TModelUnit GetOffsetY() const

void Color4d(GLdouble r, GLdouble g, GLdouble b, GLdouble a)

void SetSize(size_t size)

void FillGradient(const CRgbaColor &start_c, const CRgbaColor &end_c)

initialize the whole table with gradient colors in [start_c, end_c] range

bool PtInRect(T x, T y) const

virtual void End()=0

Finish rendering (create buffer and send to renderer)

virtual void PolygonMode(GLenum face, GLenum mode)=0

Set the polygon rasterization mode.

void Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a)

TModelRect & GetVisibleRect(void)

virtual void Disable(GLenum glstate)=0

glDisable()

virtual void LineWidth(GLfloat w)=0

Set line width for drawing: glLineWidth()

TModelUnit GetScaleX(void) const

TModelUnit GetScaleY(void) const

TModelUnit GetOffsetX() const

virtual void ColorC(const CRgbaColor &c)=0

Set current color (glColor{3,4}{f,d}{v,})

TVPPoint Project(TModelUnit m_x, TModelUnit m_y) const

float GetBlue(void) const

float GetGreen(void) const

float GetRed(void) const

Get specific channels in floating point values.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

unsigned int

A callback function used to compare two keys in a database.

static const float kHitLineWidth

bool InRange(TModelUnit z, TModelUnit z1, TModelUnit z2)

static const int kDefIndex

static float kHitAlpha

CHitMatrixGraph.

static const int kSelectedIndex

static int kHitTestPrecision

static const int kHiddenIndex

const struct ncbi::grid::netcache::search::fields::SIZE size

const GenericPointer< typename T::ValueType > T2 value

The NCBI C++/STL use hints.

double GetColorNorm(double value, bool precise=true) const

double GetMin(bool precise=true) const

double GetMax(bool precise=true) const


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4